project_name string | class_name string | class_modifiers string | class_implements int64 | class_extends int64 | function_name string | function_body string | cyclomatic_complexity int64 | NLOC int64 | num_parameter int64 | num_token int64 | num_variable int64 | start_line int64 | end_line int64 | function_index int64 | function_params string | function_variable string | function_return_type string | function_body_line_type string | function_num_functions int64 | function_num_lines int64 | outgoing_function_count int64 | outgoing_function_names string | incoming_function_count int64 | incoming_function_names string | lexical_representation string |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
VectorInstitute_vector-inference | ListCmdDisplay | public | 0 | 0 | _format_single_model_output | def _format_single_model_output(self, config: ModelConfig) -> Union[str, Table]:"""Format output table for a single model.Parameters----------config : ModelConfigModel configuration to formatReturns-------Union[str, Table]Either a JSON string for JSON output or a Rich table"""if self.json_mode:# Exclude non-essential f... | 7 | 17 | 2 | 154 | 0 | 378 | 409 | 378 | self,config | [] | Union[str, Table] | {"Assign": 4, "Expr": 4, "For": 2, "If": 3, "Return": 2} | 12 | 32 | 12 | ["config.model_dump", "str", "json.dumps", "create_table", "items", "config.model_dump", "table.add_row", "str", "table.add_row", "value.items", "table.add_row", "str"] | 0 | [] | The function (_format_single_model_output) defined within the public class called ListCmdDisplay.The function start at line 378 and ends at 409. It contains 17 lines of code and it has a cyclomatic complexity of 7. It takes 2 parameters, represented as [378.0] and does not return any value. It declares 12.0 functions, ... |
VectorInstitute_vector-inference | ListCmdDisplay | public | 0 | 0 | _format_all_models_output | def _format_all_models_output(self, model_infos: list[ModelInfo]) -> Union[list[str], list[Panel]]:"""Format output table for all models.Parameters----------model_infos : list[ModelInfo]List of model information to formatReturns-------Union[list[str], list[Panel]]Either a list of model names or a list of formatted pane... | 4 | 16 | 2 | 107 | 0 | 411 | 446 | 411 | self,model_infos | [] | Union[list[str], list[Panel]] | {"Assign": 5, "AugAssign": 1, "Expr": 2, "For": 1, "If": 1, "Return": 1} | 5 | 36 | 5 | ["sorted", "MODEL_TYPE_PRIORITY.get", "MODEL_TYPE_COLORS.get", "panels.append", "Panel"] | 0 | [] | The function (_format_all_models_output) defined within the public class called ListCmdDisplay.The function start at line 411 and ends at 446. It contains 16 lines of code and it has a cyclomatic complexity of 4. It takes 2 parameters, represented as [411.0] and does not return any value. It declares 5.0 functions, and... |
VectorInstitute_vector-inference | ListCmdDisplay | public | 0 | 0 | display_single_model_output | def display_single_model_output(self, config: ModelConfig) -> None:"""Display the output for a single model.Parameters----------config : ModelConfigModel configuration to display"""output = self._format_single_model_output(config)if self.json_mode:click.echo(output)else:self.console.print(output) | 2 | 6 | 2 | 41 | 0 | 448 | 460 | 448 | self,config | [] | None | {"Assign": 1, "Expr": 3, "If": 1} | 3 | 13 | 3 | ["self._format_single_model_output", "click.echo", "self.console.print"] | 0 | [] | The function (display_single_model_output) defined within the public class called ListCmdDisplay.The function start at line 448 and ends at 460. It contains 6 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [448.0] and does not return any value. It declares 3.0 functions, an... |
VectorInstitute_vector-inference | ListCmdDisplay | public | 0 | 0 | display_all_models_output | def display_all_models_output(self, model_infos: list[ModelInfo]) -> None:"""Display the output for all models.Parameters----------model_infos : list[ModelInfo]List of model information to displayNotes-----Output format depends on json_mode:- JSON: List of model names- Table: Color-coded panels with model information""... | 3 | 7 | 2 | 71 | 0 | 462 | 481 | 462 | self,model_infos | [] | None | {"Assign": 2, "Expr": 3, "If": 1} | 5 | 20 | 5 | ["click.echo", "json.dumps", "self._format_all_models_output", "self.console.print", "Columns"] | 0 | [] | The function (display_all_models_output) defined within the public class called ListCmdDisplay.The function start at line 462 and ends at 481. It contains 7 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [462.0] and does not return any value. It declares 5.0 functions, and ... |
VectorInstitute_vector-inference | public | public | 0 | 0 | create_table | def create_table(key_title: str = "", value_title: str = "", show_header: bool = True) -> Table:"""Create a table for displaying model status.Creates a two-column Rich table with consistent styling for displayingkey-value pairs in the CLI.Parameters----------key_title : str, default=""Title for the key columnvalue_titl... | 1 | 7 | 3 | 54 | 1 | 10 | 38 | 10 | key_title,value_title,show_header | ['table'] | Table | {"Assign": 1, "Expr": 3, "Return": 1} | 3 | 29 | 3 | ["Table", "table.add_column", "table.add_column"] | 34 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3701027_amosbastian_fpl.fpl.cli_py.importaccount", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3712295_dalibo_temboard_agent.tests.func.test_activity_py.TestActivity.test_03_activity_waiting", "_.content.gdrive.My... | The function (create_table) defined within the public class called public.The function start at line 10 and ends at 38. It contains 7 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [10.0] and does not return any value. It declares 3.0 functions, It has 3.0 functions called ... |
VectorInstitute_vector-inference | ModelLauncher | public | 0 | 0 | __init__ | def __init__(self, model_name: str, kwargs: Optional[dict[str, Any]]):self.model_name = model_nameself.kwargs = kwargs or {}self.slurm_job_id = ""self.slurm_script_path = Path("")self.model_config = self._get_model_configuration(self.kwargs.get("config"))self.params = self._get_launch_params() | 2 | 7 | 3 | 73 | 0 | 59 | 65 | 59 | self,model_name,kwargs | [] | None | {"Assign": 6} | 4 | 7 | 4 | ["Path", "self._get_model_configuration", "self.kwargs.get", "self._get_launch_params"] | 14,667 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.query_py.AllocationError.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.query_py.ContentError.__init__", "_... | The function (__init__) defined within the public class called ModelLauncher.The function start at line 59 and ends at 65. It contains 7 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [59.0] and does not return any value. It declares 4.0 functions, It has 4.0 functions call... |
VectorInstitute_vector-inference | ModelLauncher | public | 0 | 0 | _warn | def _warn(self, message: str) -> None:"""Warn the user about a potential issue.Parameters----------message : strWarning message to display"""warnings.warn(message, UserWarning, stacklevel=2) | 1 | 2 | 2 | 24 | 0 | 67 | 75 | 67 | self,message | [] | None | {"Expr": 2} | 1 | 9 | 1 | ["warnings.warn"] | 0 | [] | The function (_warn) defined within the public class called ModelLauncher.The function start at line 67 and ends at 75. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [67.0] and does not return any value. It declare 1.0 function, and It has 1.0 function calle... |
VectorInstitute_vector-inference | ModelLauncher | public | 0 | 0 | _get_model_configuration | def _get_model_configuration(self, config_path: str | None = None) -> ModelConfig:"""Load and validate model configuration.Parameters----------config_path : str | None, optionalPath to a yaml file with custom model config to use in place of the defaultReturns-------ModelConfigValidated configuration for the modelRaises... | 7 | 33 | 2 | 157 | 0 | 77 | 137 | 77 | self,config_path | [] | ModelConfig | {"Assign": 4, "Expr": 2, "If": 3, "Return": 2} | 11 | 61 | 11 | ["utils.load_config", "next", "self.kwargs.get", "ModelNotFoundError", "Path", "model_weights_path.exists", "self._warn", "ModelConfig", "Path", "str", "ModelConfigurationError"] | 0 | [] | The function (_get_model_configuration) defined within the public class called ModelLauncher.The function start at line 77 and ends at 137. It contains 33 lines of code and it has a cyclomatic complexity of 7. It takes 2 parameters, represented as [77.0] and does not return any value. It declares 11.0 functions, and I... |
VectorInstitute_vector-inference | ModelLauncher | public | 0 | 0 | _process_vllm_args | def _process_vllm_args(self, arg_string: str) -> dict[str, Any]:"""Process the vllm_args string into a dictionary.Parameters----------arg_string : strComma-separated string of vLLM argumentsReturns-------dict[str, Any]Processed vLLM arguments as key-value pairs"""vllm_args: dict[str, str | bool] = {}for arg in arg_stri... | 5 | 14 | 2 | 135 | 0 | 139 | 164 | 139 | self,arg_string | [] | dict[str, Any] | {"AnnAssign": 1, "Assign": 6, "Expr": 1, "For": 1, "If": 3, "Return": 1} | 10 | 26 | 10 | ["arg_string.split", "arg.split", "key.strip", "key.strip", "key.strip", "value.strip", "arg.strip", "strip", "arg.strip", "arg.strip"] | 0 | [] | The function (_process_vllm_args) defined within the public class called ModelLauncher.The function start at line 139 and ends at 164. It contains 14 lines of code and it has a cyclomatic complexity of 5. It takes 2 parameters, represented as [139.0] and does not return any value. It declares 10.0 functions, and It ha... |
VectorInstitute_vector-inference | ModelLauncher | public | 0 | 0 | _process_env_vars | def _process_env_vars(self, env_arg: str) -> dict[str, str]:"""Process the env string into a dictionary of environment variables.Parameters----------env_arg : strString containing comma separated list of environment variable definitions(eg. MY_VAR=1), file paths containing environment variable definitions(separated by ... | 6 | 16 | 2 | 135 | 0 | 166 | 196 | 166 | self,env_arg | [] | dict[str, str] | {"AnnAssign": 1, "Assign": 5, "Expr": 2, "For": 2, "If": 2, "Return": 1, "With": 1} | 10 | 31 | 10 | ["env_arg.split", "arg.split", "key.strip", "value.strip", "open", "line.rstrip", "line.split", "key.strip", "value.strip", "print"] | 0 | [] | The function (_process_env_vars) defined within the public class called ModelLauncher.The function start at line 166 and ends at 196. It contains 16 lines of code and it has a cyclomatic complexity of 6. It takes 2 parameters, represented as [166.0] and does not return any value. It declares 10.0 functions, and It has... |
VectorInstitute_vector-inference | ModelLauncher | public | 0 | 0 | _get_launch_params | def _get_launch_params(self) -> dict[str, Any]:"""Prepare launch parameters, set log dir, and validate required fields.Returns-------dict[str, Any]Dictionary of prepared launch parametersRaises------MissingRequiredFieldsErrorIf required fields are missing or tensor parallel size is not specifiedwhen using multiple GPUs... | 13 | 54 | 1 | 380 | 0 | 198 | 283 | 198 | self | [] | dict[str, Any] | {"Assign": 17, "Expr": 3, "For": 4, "If": 7, "Return": 1} | 27 | 86 | 27 | ["self.model_config.model_dump", "self.kwargs.get", "self._process_vllm_args", "vllm_args.items", "self.kwargs.get", "self._process_env_vars", "env_vars.items", "str", "self.kwargs.items", "utils.check_required_fields", "int", "get", "MissingRequiredFieldsError", "int", "int", "utils.is_power_of_two", "ValueError", "in... | 0 | [] | The function (_get_launch_params) defined within the public class called ModelLauncher.The function start at line 198 and ends at 283. It contains 54 lines of code and it has a cyclomatic complexity of 13. The function does not take any parameters and does not return any value. It declares 27.0 functions, and It has 2... |
VectorInstitute_vector-inference | ModelLauncher | public | 0 | 0 | _build_launch_command | def _build_launch_command(self) -> str:"""Generate the slurm script and construct the launch command.Returns-------strComplete SLURM launch command"""self.slurm_script_path = SlurmScriptGenerator(self.params).write_to_log_dir()return f"sbatch {self.slurm_script_path}" | 1 | 3 | 1 | 25 | 0 | 285 | 294 | 285 | self | [] | str | {"Assign": 1, "Expr": 1, "Return": 1} | 2 | 10 | 2 | ["write_to_log_dir", "SlurmScriptGenerator"] | 0 | [] | The function (_build_launch_command) defined within the public class called ModelLauncher.The function start at line 285 and ends at 294. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0 functions, and It has 2... |
VectorInstitute_vector-inference | ModelLauncher | public | 0 | 0 | launch | def launch(self) -> LaunchResponse:"""Launch the model.Returns-------LaunchResponseResponse object containing launch details and statusRaises------SlurmJobErrorIf SLURM job submission fails"""# Build and execute the launch commandcommand_output, stderr = utils.run_bash_command(self._build_launch_command())if stderr:rai... | 2 | 26 | 1 | 169 | 0 | 296 | 343 | 296 | self | [] | LaunchResponse | {"Assign": 5, "Expr": 5, "If": 1, "Return": 1, "With": 1} | 14 | 48 | 14 | ["utils.run_bash_command", "self._build_launch_command", "SlurmJobError", "strip", "strip", "command_output.split", "Path", "job_log_dir.mkdir", "Path", "job_json.touch", "self.slurm_script_path.rename", "job_json.open", "json.dump", "LaunchResponse"] | 5 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3703461_scoutapp_scout_apm_python.src.scout_apm.core.__init___py.install", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3966267_mkb79_audible.src.audible.login_py.playwright_external_login_url_callback", "_.content... | The function (launch) defined within the public class called ModelLauncher.The function start at line 296 and ends at 343. It contains 26 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 14.0 functions, It has 14.0 functions call... |
VectorInstitute_vector-inference | ModelLauncher | public | 0 | 0 | __init__ | def __init__(self,model_names: list[str],batch_config: Optional[str] = None,account: Optional[str] = None,work_dir: Optional[str] = None,):self.model_names = model_namesself.batch_config = batch_configself.slurm_job_id = ""self.slurm_job_name = self._get_slurm_job_name()self.batch_script_path = Path("")self.launch_scri... | 1 | 15 | 5 | 104 | 0 | 358 | 372 | 358 | self,model_name,kwargs | [] | None | {"Assign": 6} | 4 | 7 | 4 | ["Path", "self._get_model_configuration", "self.kwargs.get", "self._get_launch_params"] | 14,667 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.query_py.AllocationError.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.query_py.ContentError.__init__", "_... | The function (__init__) defined within the public class called ModelLauncher.The function start at line 358 and ends at 372. It contains 15 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [358.0] and does not return any value. It declares 4.0 functions, It has 4.0 functions ... |
VectorInstitute_vector-inference | BatchModelLauncher | public | 0 | 0 | _get_slurm_job_name | def _get_slurm_job_name(self) -> str:"""Get the SLURM job name from the model names.Returns-------strSLURM job name"""return "BATCH-" + "-".join(self.model_names) | 1 | 2 | 1 | 19 | 0 | 374 | 382 | 374 | self | [] | str | {"Expr": 1, "Return": 1} | 1 | 9 | 1 | ["join"] | 0 | [] | The function (_get_slurm_job_name) defined within the public class called BatchModelLauncher.The function start at line 374 and ends at 382. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, and It has ... |
VectorInstitute_vector-inference | BatchModelLauncher | public | 0 | 0 | _get_model_configurations | def _get_model_configurations(self) -> dict[str, ModelConfig]:"""Load and validate model configurations.Returns-------dict[str, ModelConfig]Dictionary of validated model configurationsRaises------ModelNotFoundErrorIf model weights parent directory cannot be determinedModelConfigurationErrorIf model configuration is not... | 5 | 14 | 1 | 73 | 0 | 384 | 414 | 384 | self | [] | dict[str, ModelConfig] | {"Assign": 4, "Expr": 1, "For": 1, "If": 1, "Return": 1} | 3 | 31 | 3 | ["utils.load_config", "next", "ModelConfigurationError"] | 0 | [] | The function (_get_model_configurations) defined within the public class called BatchModelLauncher.The function start at line 384 and ends at 414. It contains 14 lines of code and it has a cyclomatic complexity of 5. The function does not take any parameters and does not return any value. It declares 3.0 functions, and... |
VectorInstitute_vector-inference | ModelLauncher | public | 0 | 0 | _get_launch_params | def _get_launch_params(self, account: Optional[str] = None, work_dir: Optional[str] = None) -> dict[str, Any]:"""Prepare launch parameters, set log dir, and validate required fields.Returns-------dict[str, Any]Dictionary of prepared launch parametersRaises------MissingRequiredFieldsErrorIf required fields are missing o... | 14 | 70 | 3 | 465 | 0 | 416 | 519 | 416 | self | [] | dict[str, Any] | {"Assign": 17, "Expr": 3, "For": 4, "If": 7, "Return": 1} | 27 | 86 | 27 | ["self.model_config.model_dump", "self.kwargs.get", "self._process_vllm_args", "vllm_args.items", "self.kwargs.get", "self._process_env_vars", "env_vars.items", "str", "self.kwargs.items", "utils.check_required_fields", "int", "get", "MissingRequiredFieldsError", "int", "int", "utils.is_power_of_two", "ValueError", "in... | 0 | [] | The function (_get_launch_params) defined within the public class called ModelLauncher.The function start at line 416 and ends at 519. It contains 70 lines of code and it has a cyclomatic complexity of 14. It takes 3 parameters, represented as [416.0] and does not return any value. It declares 27.0 functions, and It h... |
VectorInstitute_vector-inference | ModelLauncher | public | 0 | 0 | _build_launch_command | def _build_launch_command(self) -> str:"""Generate the slurm script and construct the launch command.Returns-------strComplete SLURM launch command"""batch_script_generator = BatchSlurmScriptGenerator(self.params)self.batch_script_path = batch_script_generator.generate_batch_slurm_script()self.launch_script_paths = bat... | 1 | 5 | 1 | 35 | 0 | 521 | 532 | 521 | self | [] | str | {"Assign": 1, "Expr": 1, "Return": 1} | 2 | 10 | 2 | ["write_to_log_dir", "SlurmScriptGenerator"] | 0 | [] | The function (_build_launch_command) defined within the public class called ModelLauncher.The function start at line 521 and ends at 532. It contains 5 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0 functions, and It has 2... |
VectorInstitute_vector-inference | ModelLauncher | public | 0 | 0 | launch | def launch(self) -> BatchLaunchResponse:"""Launch models in batch mode.Returns-------BatchLaunchResponseResponse object containing launch details and statusRaises------SlurmJobErrorIf SLURM job submission fails"""# Build and execute the launch commandcommand_output, stderr = utils.run_bash_command(self._build_launch_co... | 6 | 47 | 1 | 334 | 0 | 534 | 611 | 534 | self | [] | LaunchResponse | {"Assign": 5, "Expr": 5, "If": 1, "Return": 1, "With": 1} | 14 | 48 | 14 | ["utils.run_bash_command", "self._build_launch_command", "SlurmJobError", "strip", "strip", "command_output.split", "Path", "job_log_dir.mkdir", "Path", "job_json.touch", "self.slurm_script_path.rename", "job_json.open", "json.dump", "LaunchResponse"] | 5 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3703461_scoutapp_scout_apm_python.src.scout_apm.core.__init___py.install", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3966267_mkb79_audible.src.audible.login_py.playwright_external_login_url_callback", "_.content... | The function (launch) defined within the public class called ModelLauncher.The function start at line 534 and ends at 611. It contains 47 lines of code and it has a cyclomatic complexity of 6. The function does not take any parameters and does not return any value. It declares 14.0 functions, It has 14.0 functions call... |
VectorInstitute_vector-inference | ModelLauncher | public | 0 | 0 | __init__ | def __init__(self, slurm_job_id: str):self.slurm_job_id = slurm_job_idself.output = self._get_raw_status_output()self.job_status = dict(field.split("=", 1) for field in self.output.split() if "=" in field)self.log_dir = self._get_log_dir()self.status_info = self._get_base_status_data() | 3 | 8 | 2 | 70 | 0 | 626 | 633 | 626 | self,model_name,kwargs | [] | None | {"Assign": 6} | 4 | 7 | 4 | ["Path", "self._get_model_configuration", "self.kwargs.get", "self._get_launch_params"] | 14,667 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.query_py.AllocationError.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.query_py.ContentError.__init__", "_... | The function (__init__) defined within the public class called ModelLauncher.The function start at line 626 and ends at 633. It contains 8 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [626.0] and does not return any value. It declares 4.0 functions, It has 4.0 functions c... |
VectorInstitute_vector-inference | ModelStatusMonitor | public | 0 | 0 | _get_raw_status_output | def _get_raw_status_output(self) -> str:"""Get the raw server status output from slurm.Returns-------strRaw output from scontrol commandRaises------SlurmJobErrorIf status check fails"""status_cmd = f"scontrol show job {self.slurm_job_id} --oneliner"output, stderr = utils.run_bash_command(status_cmd)if stderr:raise Slur... | 2 | 6 | 1 | 33 | 0 | 635 | 653 | 635 | self | [] | str | {"Assign": 2, "Expr": 1, "If": 1, "Return": 1} | 2 | 19 | 2 | ["utils.run_bash_command", "SlurmJobError"] | 0 | [] | The function (_get_raw_status_output) defined within the public class called ModelStatusMonitor.The function start at line 635 and ends at 653. It contains 6 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 2.0 functions, and It... |
VectorInstitute_vector-inference | ModelStatusMonitor | public | 0 | 0 | _get_log_dir | def _get_log_dir(self) -> str:"""Get the log directory for the job.Returns-------strLog directory for the job"""try:outfile_path = self.job_status["StdOut"]directory = Path(outfile_path).parentreturn str(directory)except KeyError as err:raise FileNotFoundError(f"Output file not found for job {self.slurm_job_id}") from ... | 2 | 9 | 1 | 44 | 0 | 655 | 670 | 655 | self | [] | str | {"Assign": 2, "Expr": 1, "Return": 1, "Try": 1} | 3 | 16 | 3 | ["Path", "str", "FileNotFoundError"] | 0 | [] | The function (_get_log_dir) defined within the public class called ModelStatusMonitor.The function start at line 655 and ends at 670. It contains 9 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 3.0 functions, and It has 3.0 f... |
VectorInstitute_vector-inference | ModelStatusMonitor | public | 0 | 0 | _get_base_status_data | def _get_base_status_data(self) -> StatusResponse:"""Extract basic job status information from scontrol output.Returns-------StatusResponseBasic status information for the job"""try:job_name = self.job_status["JobName"]job_state = self.job_status["JobState"]except KeyError:job_name = "UNAVAILABLE"job_state = ModelStatu... | 2 | 17 | 1 | 79 | 0 | 672 | 696 | 672 | self | [] | StatusResponse | {"Assign": 4, "Expr": 1, "Return": 1, "Try": 1} | 1 | 25 | 1 | ["StatusResponse"] | 0 | [] | The function (_get_base_status_data) defined within the public class called ModelStatusMonitor.The function start at line 672 and ends at 696. It contains 17 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declare 1.0 function, and It h... |
VectorInstitute_vector-inference | ModelStatusMonitor | public | 0 | 0 | _check_model_health | def _check_model_health(self) -> None:"""Check model health and update status accordingly."""status, status_code = utils.model_health_check(self.status_info.model_name, self.slurm_job_id, self.log_dir)if status == ModelStatus.READY:self.status_info.base_url = utils.get_base_url(self.status_info.model_name,self.slurm_jo... | 2 | 14 | 1 | 90 | 0 | 698 | 712 | 698 | self | [] | None | {"Assign": 5, "Expr": 1, "If": 1} | 3 | 15 | 3 | ["utils.model_health_check", "utils.get_base_url", "cast"] | 0 | [] | The function (_check_model_health) defined within the public class called ModelStatusMonitor.The function start at line 698 and ends at 712. It contains 14 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 3.0 functions, and It h... |
VectorInstitute_vector-inference | ModelStatusMonitor | public | 0 | 0 | _process_running_state | def _process_running_state(self) -> None:"""Process RUNNING job state and check server status."""server_status = utils.is_server_running(self.status_info.model_name, self.slurm_job_id, self.log_dir)if isinstance(server_status, tuple):self.status_info.server_status, self.status_info.failed_reason = (server_status)return... | 3 | 13 | 1 | 76 | 0 | 714 | 729 | 714 | self | [] | None | {"Assign": 3, "Expr": 2, "If": 2, "Return": 1} | 4 | 16 | 4 | ["utils.is_server_running", "isinstance", "self._check_model_health", "cast"] | 0 | [] | The function (_process_running_state) defined within the public class called ModelStatusMonitor.The function start at line 714 and ends at 729. It contains 13 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value. It declares 4.0 functions, and I... |
VectorInstitute_vector-inference | ModelStatusMonitor | public | 0 | 0 | _process_pending_state | def _process_pending_state(self) -> None:"""Process PENDING job state and update status information."""try:self.status_info.pending_reason = self.job_status["Reason"]self.status_info.server_status = ModelStatus.PENDINGexcept KeyError:self.status_info.pending_reason = "Unknown pending reason" | 2 | 6 | 1 | 41 | 0 | 731 | 737 | 731 | self | [] | None | {"Assign": 3, "Expr": 1, "Try": 1} | 0 | 7 | 0 | [] | 0 | [] | The function (_process_pending_state) defined within the public class called ModelStatusMonitor.The function start at line 731 and ends at 737. It contains 6 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value.. |
VectorInstitute_vector-inference | ModelStatusMonitor | public | 0 | 0 | process_model_status | def process_model_status(self) -> StatusResponse:"""Process different job states and update status information.Returns-------StatusResponseComplete status information for the model"""if self.status_info.job_state == ModelStatus.PENDING:self._process_pending_state()elif self.status_info.job_state == "RUNNING":self._proc... | 3 | 6 | 1 | 42 | 0 | 739 | 752 | 739 | self | [] | StatusResponse | {"Expr": 3, "If": 2, "Return": 1} | 2 | 14 | 2 | ["self._process_pending_state", "self._process_running_state"] | 0 | [] | The function (process_model_status) defined within the public class called ModelStatusMonitor.The function start at line 739 and ends at 752. It contains 6 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value. It declares 2.0 functions, and It h... |
VectorInstitute_vector-inference | ModelLauncher | public | 0 | 0 | __init__ | def __init__(self, slurm_job_id: str):self.slurm_job_id = slurm_job_idself.status_info = self._get_status_info()self.log_dir = self.status_info.log_dirself.metrics_url = self._build_metrics_url()self.enabled_prefix_caching = self._check_prefix_caching()self._prev_prompt_tokens: float = 0.0self._prev_generation_tokens: ... | 1 | 10 | 2 | 95 | 0 | 769 | 779 | 769 | self,model_name,kwargs | [] | None | {"Assign": 6} | 4 | 7 | 4 | ["Path", "self._get_model_configuration", "self.kwargs.get", "self._get_launch_params"] | 14,667 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.query_py.AllocationError.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.query_py.ContentError.__init__", "_... | The function (__init__) defined within the public class called ModelLauncher.The function start at line 769 and ends at 779. It contains 10 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [769.0] and does not return any value. It declares 4.0 functions, It has 4.0 functions ... |
VectorInstitute_vector-inference | PerformanceMetricsCollector | public | 0 | 0 | _get_status_info | def _get_status_info(self) -> StatusResponse:"""Retrieve status info using existing StatusHelper.Returns-------StatusResponseCurrent status information for the model"""status_helper = ModelStatusMonitor(self.slurm_job_id)return status_helper.process_model_status() | 1 | 3 | 1 | 22 | 0 | 781 | 790 | 781 | self | [] | StatusResponse | {"Assign": 1, "Expr": 1, "Return": 1} | 2 | 10 | 2 | ["ModelStatusMonitor", "status_helper.process_model_status"] | 0 | [] | The function (_get_status_info) defined within the public class called PerformanceMetricsCollector.The function start at line 781 and ends at 790. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0 functions, and ... |
VectorInstitute_vector-inference | PerformanceMetricsCollector | public | 0 | 0 | _build_metrics_url | def _build_metrics_url(self) -> str:"""Construct metrics endpoint URL from base URL with version stripping.Returns-------strComplete metrics endpoint URL or status message"""if self.status_info.job_state == ModelStatus.PENDING:return "Pending resources for server initialization"base_url = utils.get_base_url(self.status... | 3 | 15 | 1 | 100 | 0 | 792 | 815 | 792 | self | [] | str | {"Assign": 3, "Expr": 1, "If": 2, "Return": 3} | 6 | 24 | 6 | ["utils.get_base_url", "base_url.startswith", "urlparse", "rstrip", "parsed.path.replace", "urlunparse"] | 0 | [] | The function (_build_metrics_url) defined within the public class called PerformanceMetricsCollector.The function start at line 792 and ends at 815. It contains 15 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value. It declares 6.0 functions, a... |
VectorInstitute_vector-inference | PerformanceMetricsCollector | public | 0 | 0 | _check_prefix_caching | def _check_prefix_caching(self) -> bool:"""Check if prefix caching is enabled.Returns-------boolTrue if prefix caching is enabled, False otherwise"""job_json = utils.read_slurm_log(self.status_info.model_name,self.slurm_job_id,"json",self.log_dir,)if isinstance(job_json, str):return Falsereturn bool(cast(dict[str, str]... | 2 | 10 | 1 | 63 | 0 | 817 | 833 | 817 | self | [] | bool | {"Assign": 1, "Expr": 1, "If": 1, "Return": 2} | 5 | 17 | 5 | ["utils.read_slurm_log", "isinstance", "bool", "get", "cast"] | 0 | [] | The function (_check_prefix_caching) defined within the public class called PerformanceMetricsCollector.The function start at line 817 and ends at 833. It contains 10 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 5.0 functions... |
VectorInstitute_vector-inference | PerformanceMetricsCollector | public | 0 | 0 | _parse_metrics | def _parse_metrics(self, metrics_text: str) -> dict[str, float]:"""Parse metrics with latency count and sum.Parameters----------metrics_text : strRaw metrics text from the serverReturns-------dict[str, float]Parsed metrics as key-value pairs"""key_metrics = KEY_METRICSif self.enabled_prefix_caching:key_metrics["vllm:gp... | 8 | 19 | 2 | 136 | 0 | 835 | 869 | 835 | self,metrics_text | [] | dict[str, float] | {"AnnAssign": 1, "Assign": 6, "Expr": 1, "For": 1, "If": 4, "Return": 1, "Try": 1} | 7 | 35 | 7 | ["metrics_text.split", "line.startswith", "line.strip", "line.split", "len", "split", "float"] | 0 | [] | The function (_parse_metrics) defined within the public class called PerformanceMetricsCollector.The function start at line 835 and ends at 869. It contains 19 lines of code and it has a cyclomatic complexity of 8. It takes 2 parameters, represented as [835.0] and does not return any value. It declares 7.0 functions, a... |
VectorInstitute_vector-inference | PerformanceMetricsCollector | public | 0 | 0 | fetch_metrics | def fetch_metrics(self) -> Union[dict[str, float], str]:"""Fetch metrics from the endpoint.Returns-------Union[dict[str, float], str]Dictionary of metrics or error message if request fails"""try:response = requests.get(self.metrics_url, timeout=3)response.raise_for_status()current_metrics = self._parse_metrics(response... | 9 | 56 | 1 | 306 | 0 | 871 | 949 | 871 | self | [] | Union[dict[str, float], str] | {"Assign": 23, "Expr": 4, "If": 3, "Return": 3, "Try": 1} | 11 | 79 | 11 | ["requests.get", "response.raise_for_status", "self._parse_metrics", "time.time", "current_metrics.setdefault", "current_metrics.setdefault", "current_metrics.get", "current_metrics.get", "current_metrics.get", "current_metrics.get", "str"] | 0 | [] | The function (fetch_metrics) defined within the public class called PerformanceMetricsCollector.The function start at line 871 and ends at 949. It contains 56 lines of code and it has a cyclomatic complexity of 9. The function does not take any parameters and does not return any value. It declares 11.0 functions, and ... |
VectorInstitute_vector-inference | ModelLauncher | public | 0 | 0 | __init__ | def __init__(self) -> None:"""Initialize the model lister."""self.model_configs = utils.load_config() | 1 | 2 | 1 | 17 | 0 | 959 | 961 | 959 | self,model_name,kwargs | [] | None | {"Assign": 6} | 4 | 7 | 4 | ["Path", "self._get_model_configuration", "self.kwargs.get", "self._get_launch_params"] | 14,667 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.query_py.AllocationError.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.query_py.ContentError.__init__", "_... | The function (__init__) defined within the public class called ModelLauncher.The function start at line 959 and ends at 961. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 4.0 functions, It has 4.0 functions calle... |
VectorInstitute_vector-inference | ModelRegistry | public | 0 | 0 | get_all_models | def get_all_models(self) -> list[ModelInfo]:"""Get all available models.Returns-------list[ModelInfo]List of information about all available models"""available_models = []for config in self.model_configs:info = ModelInfo(name=config.model_name,family=config.model_family,variant=config.model_variant,model_type=ModelType... | 2 | 12 | 1 | 91 | 0 | 963 | 981 | 963 | self | [] | list[ModelInfo] | {"Assign": 2, "Expr": 2, "For": 1, "Return": 1} | 5 | 19 | 5 | ["ModelInfo", "ModelType", "config.model_dump", "available_models.append", "sorted"] | 0 | [] | The function (get_all_models) defined within the public class called ModelRegistry.The function start at line 963 and ends at 981. It contains 12 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 5.0 functions, and It has 5.0 fun... |
VectorInstitute_vector-inference | ModelRegistry | public | 0 | 0 | get_single_model_config | def get_single_model_config(self, model_name: str) -> ModelConfig:"""Get configuration for a specific model.Parameters----------model_name : strName of the model to retrieve configuration forReturns-------ModelConfigConfiguration for the specified modelRaises------ModelNotFoundErrorIf the specified model is not found i... | 4 | 8 | 2 | 47 | 0 | 983 | 1,007 | 983 | self,model_name | [] | ModelConfig | {"Assign": 1, "Expr": 1, "If": 1, "Return": 1} | 2 | 25 | 2 | ["next", "ModelNotFoundError"] | 0 | [] | The function (get_single_model_config) defined within the public class called ModelRegistry.The function start at line 983 and ends at 1007. It contains 8 lines of code and it has a cyclomatic complexity of 4. It takes 2 parameters, represented as [983.0] and does not return any value. It declares 2.0 functions, and I... |
VectorInstitute_vector-inference | SlurmScriptGenerator | public | 0 | 0 | __init__ | def __init__(self, params: dict[str, Any]):self.params = paramsself.is_multinode = int(self.params["num_nodes"]) > 1self.use_container = (self.params["venv"] == "singularity" or self.params["venv"] == "apptainer")self.additional_binds = self.params.get("bind", "")if self.additional_binds:self.additional_binds = f" --bi... | 5 | 20 | 2 | 172 | 0 | 32 | 52 | 32 | self,params | [] | None | {"AnnAssign": 1, "Assign": 8, "AugAssign": 2, "For": 1, "If": 2} | 7 | 21 | 7 | ["int", "self.params.get", "str", "Path", "self.params.get", "env_dict.items", "len"] | 14,667 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.query_py.AllocationError.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.query_py.ContentError.__init__", "_... | The function (__init__) defined within the public class called SlurmScriptGenerator.The function start at line 32 and ends at 52. It contains 20 lines of code and it has a cyclomatic complexity of 5. It takes 2 parameters, represented as [32.0] and does not return any value. It declares 7.0 functions, It has 7.0 functi... |
VectorInstitute_vector-inference | SlurmScriptGenerator | public | 0 | 0 | _generate_script_content | def _generate_script_content(self) -> str:"""Generate the complete Slurm script content.Returns-------strThe complete Slurm script as a string."""script_content = []script_content.append(self._generate_shebang())script_content.append(self._generate_server_setup())script_content.append(self._generate_launch_cmd())return... | 1 | 6 | 1 | 49 | 0 | 54 | 66 | 54 | self | [] | str | {"Assign": 1, "Expr": 4, "Return": 1} | 7 | 13 | 7 | ["script_content.append", "self._generate_shebang", "script_content.append", "self._generate_server_setup", "script_content.append", "self._generate_launch_cmd", "join"] | 0 | [] | The function (_generate_script_content) defined within the public class called SlurmScriptGenerator.The function start at line 54 and ends at 66. It contains 6 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 7.0 functions, and ... |
VectorInstitute_vector-inference | SlurmScriptGenerator | public | 0 | 0 | _generate_shebang | def _generate_shebang(self) -> str:"""Generate the Slurm script shebang with job specifications.Returns-------strSlurm shebang containing job specifications."""shebang = [SLURM_SCRIPT_TEMPLATE["shebang"]["base"]]for arg, value in SLURM_JOB_CONFIG_ARGS.items():if self.params.get(value):shebang.append(f"#SBATCH --{arg}={... | 4 | 8 | 1 | 68 | 0 | 68 | 82 | 68 | self | [] | str | {"Assign": 1, "AugAssign": 1, "Expr": 2, "For": 1, "If": 2, "Return": 1} | 4 | 15 | 4 | ["SLURM_JOB_CONFIG_ARGS.items", "self.params.get", "shebang.append", "join"] | 0 | [] | The function (_generate_shebang) defined within the public class called SlurmScriptGenerator.The function start at line 68 and ends at 82. It contains 8 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters and does not return any value. It declares 4.0 functions, and It has ... |
VectorInstitute_vector-inference | SlurmScriptGenerator | public | 0 | 0 | _generate_server_setup | def _generate_server_setup(self) -> str:"""Generate the server initialization script.Creates the script section that handles server setup, including Rayinitialization for multi-node setups and port configuration.Returns-------strServer initialization script content."""server_script = ["\n"]if self.use_container:server_... | 4 | 33 | 1 | 217 | 0 | 84 | 126 | 84 | self | [] | str | {"Assign": 4, "Expr": 7, "If": 3, "Return": 1} | 18 | 43 | 18 | ["server_script.append", "join", "server_script.append", "join", "server_script.append", "format", "format", "join", "server_setup_str.replace", "format", "join", "server_script.append", "server_script.append", "join", "server_script.append", "format", "join", "join"] | 0 | [] | The function (_generate_server_setup) defined within the public class called SlurmScriptGenerator.The function start at line 84 and ends at 126. It contains 33 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters and does not return any value. It declares 18.0 functions, and ... |
VectorInstitute_vector-inference | SlurmScriptGenerator | public | 0 | 0 | _generate_launch_cmd | def _generate_launch_cmd(self) -> str:"""Generate the vLLM server launch command.Creates the command to launch the vLLM server, handling different virtualizationenvironments (venv or singularity/apptainer).Returns-------strServer launch command."""launcher_script = ["\n"]if self.use_container:launcher_script.append(SLU... | 4 | 26 | 1 | 152 | 0 | 128 | 164 | 128 | self | [] | str | {"Assign": 1, "Expr": 6, "For": 1, "If": 2, "Return": 1} | 12 | 37 | 12 | ["launcher_script.append", "format", "launcher_script.append", "format", "launcher_script.append", "format", "join", "items", "isinstance", "launcher_script.append", "launcher_script.append", "join"] | 0 | [] | The function (_generate_launch_cmd) defined within the public class called SlurmScriptGenerator.The function start at line 128 and ends at 164. It contains 26 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters and does not return any value. It declares 12.0 functions, and ... |
VectorInstitute_vector-inference | SlurmScriptGenerator | public | 0 | 0 | write_to_log_dir | def write_to_log_dir(self) -> Path:"""Write the generated Slurm script to the log directory.Creates a timestamped script file in the configured log directory.Returns-------PathPath to the generated Slurm script file."""timestamp = datetime.now().strftime("%Y%m%d_%H%M%S")script_path: Path = (Path(self.params["log_dir"])... | 1 | 9 | 1 | 53 | 0 | 166 | 184 | 166 | self | [] | Path | {"AnnAssign": 1, "Assign": 2, "Expr": 2, "Return": 1} | 5 | 19 | 5 | ["strftime", "datetime.now", "Path", "self._generate_script_content", "script_path.write_text"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95055886_VectorInstitute_vector_inference.vec_inf.client._helper_py.ModelLauncher._build_launch_command"] | The function (write_to_log_dir) defined within the public class called SlurmScriptGenerator.The function start at line 166 and ends at 184. It contains 9 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 5.0 functions, It has 5.0 ... |
VectorInstitute_vector-inference | SlurmScriptGenerator | public | 0 | 0 | __init__ | def __init__(self, params: dict[str, Any]):self.params = paramsself.script_paths: list[Path] = []self.use_container = (self.params["venv"] == "singularity" or self.params["venv"] == "apptainer")for model_name in self.params["models"]:self.params["models"][model_name]["additional_binds"] = ""if self.params["models"][mod... | 4 | 18 | 2 | 144 | 0 | 194 | 211 | 194 | self,params | [] | None | {"AnnAssign": 1, "Assign": 8, "AugAssign": 2, "For": 1, "If": 2} | 7 | 21 | 7 | ["int", "self.params.get", "str", "Path", "self.params.get", "env_dict.items", "len"] | 14,667 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.query_py.AllocationError.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.query_py.ContentError.__init__", "_... | The function (__init__) defined within the public class called SlurmScriptGenerator.The function start at line 194 and ends at 211. It contains 18 lines of code and it has a cyclomatic complexity of 4. It takes 2 parameters, represented as [194.0] and does not return any value. It declares 7.0 functions, It has 7.0 fun... |
VectorInstitute_vector-inference | BatchSlurmScriptGenerator | public | 0 | 0 | _write_to_log_dir | def _write_to_log_dir(self, script_content: list[str], script_name: str) -> Path:"""Write the generated Slurm script to the log directory.Returns-------PathThe Path object to the generated Slurm script file."""script_path = Path(self.params["log_dir"]) / script_namescript_path.touch(exist_ok=True)script_path.write_text... | 1 | 5 | 3 | 53 | 0 | 213 | 224 | 213 | self,script_content,script_name | [] | Path | {"Assign": 1, "Expr": 3, "Return": 1} | 4 | 12 | 4 | ["Path", "script_path.touch", "script_path.write_text", "join"] | 0 | [] | The function (_write_to_log_dir) defined within the public class called BatchSlurmScriptGenerator.The function start at line 213 and ends at 224. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [213.0] and does not return any value. It declares 4.0 functions, a... |
VectorInstitute_vector-inference | BatchSlurmScriptGenerator | public | 0 | 0 | _generate_model_launch_script | def _generate_model_launch_script(self, model_name: str) -> Path:"""Generate the bash script for launching individual vLLM servers.Parameters----------model_name : strThe name of the model to launch.Returns-------PathThe bash script path for launching the vLLM server."""# Generate the bash script contentscript_content ... | 5 | 44 | 2 | 275 | 0 | 226 | 283 | 226 | self,model_name | [] | Path | {"Assign": 4, "Expr": 11, "For": 1, "If": 3, "Return": 1} | 22 | 58 | 22 | ["script_content.append", "script_content.append", "script_content.append", "join", "script_content.append", "format", "join", "script_content.append", "format", "join", "script_content.append", "format", "script_content.append", "format", "join", "items", "isinstance", "script_content.append", "script_content.append",... | 0 | [] | The function (_generate_model_launch_script) defined within the public class called BatchSlurmScriptGenerator.The function start at line 226 and ends at 283. It contains 44 lines of code and it has a cyclomatic complexity of 5. It takes 2 parameters, represented as [226.0] and does not return any value. It declares 22.... |
VectorInstitute_vector-inference | BatchSlurmScriptGenerator | public | 0 | 0 | _generate_batch_slurm_script_shebang | def _generate_batch_slurm_script_shebang(self) -> str:"""Generate the shebang for batch mode Slurm script.Returns-------strThe shebang for batch mode Slurm script."""shebang = [BATCH_SLURM_SCRIPT_TEMPLATE["shebang"]]for arg, value in SLURM_JOB_CONFIG_ARGS.items():if self.params.get(value):shebang.append(f"#SBATCH --{ar... | 7 | 17 | 1 | 147 | 0 | 285 | 311 | 285 | self | [] | str | {"Assign": 2, "AugAssign": 1, "Expr": 8, "For": 3, "If": 2, "Return": 1} | 12 | 27 | 12 | ["SLURM_JOB_CONFIG_ARGS.items", "self.params.get", "shebang.append", "shebang.append", "shebang.append", "shebang.append", "SLURM_JOB_CONFIG_ARGS.items", "model_params.get", "shebang.append", "shebang.append", "shebang.pop", "join"] | 0 | [] | The function (_generate_batch_slurm_script_shebang) defined within the public class called BatchSlurmScriptGenerator.The function start at line 285 and ends at 311. It contains 17 lines of code and it has a cyclomatic complexity of 7. The function does not take any parameters and does not return any value. It declares ... |
VectorInstitute_vector-inference | BatchSlurmScriptGenerator | public | 0 | 0 | generate_batch_slurm_script | def generate_batch_slurm_script(self) -> Path:"""Generate the Slurm script for launching multiple vLLM servers in batch mode.Returns-------PathThe Slurm script for launching multiple vLLM servers in batch mode."""script_content = []script_content.append(self._generate_batch_slurm_script_shebang())for model_name in self... | 2 | 24 | 1 | 151 | 0 | 313 | 346 | 313 | self | [] | Path | {"Assign": 5, "Expr": 6, "For": 1, "Return": 1} | 14 | 34 | 14 | ["script_content.append", "self._generate_batch_slurm_script_shebang", "script_content.append", "str", "self._generate_model_launch_script", "script_content.append", "format", "script_content.append", "format", "join", "script_content.append", "strftime", "datetime.now", "self._write_to_log_dir"] | 0 | [] | The function (generate_batch_slurm_script) defined within the public class called BatchSlurmScriptGenerator.The function start at line 313 and ends at 346. It contains 24 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 14.0 func... |
VectorInstitute_vector-inference | public | public | 0 | 0 | load_env_config.load_yaml_config | def load_yaml_config(path: Path) -> dict[str, Any]:"""Load YAML config with error handling."""try:with path.open() as f:return yaml.safe_load(f) or {}except FileNotFoundError as err:raise FileNotFoundError(f"Could not find config: {path}") from errexcept yaml.YAMLError as err:raise ValueError(f"Error parsing YAML confi... | 4 | 8 | 1 | 64 | 0 | 18 | 26 | 18 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (load_env_config.load_yaml_config) defined within the public class called public.The function start at line 18 and ends at 26. It contains 8 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters and does not return any value.. |
VectorInstitute_vector-inference | public | public | 0 | 0 | load_env_config | def load_env_config() -> dict[str, Any]:"""Load the environment configuration."""def load_yaml_config(path: Path) -> dict[str, Any]:"""Load YAML config with error handling."""try:with path.open() as f:return yaml.safe_load(f) or {}except FileNotFoundError as err:raise FileNotFoundError(f"Could not find config: {path}")... | 4 | 22 | 0 | 109 | 6 | 15 | 49 | 15 | ['config', 'cached_config_path', 'user_path', 'default_path', 'user_path_obj', 'user_config'] | dict[str, Any] | {"Assign": 6, "Expr": 4, "If": 2, "Return": 2, "Try": 1, "With": 1} | 14 | 35 | 14 | ["path.open", "yaml.safe_load", "FileNotFoundError", "ValueError", "cached_config_path.exists", "resolve", "Path", "load_yaml_config", "os.getenv", "Path", "user_path_obj.exists", "load_yaml_config", "config.update", "warnings.warn"] | 0 | [] | The function (load_env_config) defined within the public class called public.The function start at line 15 and ends at 49. It contains 22 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters and does not return any value. It declares 14.0 functions, and It has 14.0 functions... | |
VectorInstitute_vector-inference | public | public | 0 | 0 | create_literal_type | def create_literal_type(values: list[str], fallback: str = "") -> Any:"""Create a Literal type from a list, with configurable fallback."""if not values:return Literal[fallback]return Literal[tuple(values)] | 2 | 4 | 2 | 36 | 0 | 68 | 72 | 68 | values,fallback | [] | Any | {"Expr": 1, "If": 1, "Return": 2} | 1 | 5 | 1 | ["tuple"] | 0 | [] | The function (create_literal_type) defined within the public class called public.The function start at line 68 and ends at 72. It contains 4 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [68.0] and does not return any value. It declare 1.0 function, and It has 1.0 functio... |
VectorInstitute_vector-inference | public | public | 0 | 0 | run_bash_command | def run_bash_command(command: str) -> tuple[str, str]:"""Run a bash command and return the output.Parameters----------command : strThe bash command to executeReturns-------tuple[str, str]A tuple containing (stdout, stderr) from the command execution"""process = subprocess.Popen(command, shell=True, stdout=subprocess.PI... | 1 | 5 | 1 | 49 | 1 | 24 | 40 | 24 | command | ['process'] | tuple[str, str] | {"Assign": 1, "Expr": 1, "Return": 1} | 2 | 17 | 2 | ["subprocess.Popen", "process.communicate"] | 3 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95055886_VectorInstitute_vector_inference.tests.vec_inf.client.test_utils_py.test_run_bash_command_error", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95055886_VectorInstitute_vector_inference.tests.vec_inf.client... | The function (run_bash_command) defined within the public class called public.The function start at line 24 and ends at 40. It contains 5 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0 functions, It has 2.0 functions called... |
VectorInstitute_vector-inference | public | public | 0 | 0 | read_slurm_log | def read_slurm_log(slurm_job_name: str,slurm_job_id: str,slurm_log_type: str,log_dir: str,) -> Union[list[str], str, dict[str, str]]:"""Read the slurm log file.Parameters----------slurm_job_name : strName of the SLURM jobslurm_job_id : strID of the SLURM jobslurm_log_type : strType of log file to read ('out', 'err', or... | 4 | 20 | 4 | 134 | 2 | 43 | 83 | 43 | slurm_job_name,slurm_job_id,slurm_log_type,log_dir | ['slurm_job_id', 'file_path'] | Union[list[str], str, dict[str, str]] | {"AnnAssign": 1, "Assign": 3, "Expr": 1, "If": 2, "Return": 3, "Try": 1, "With": 2} | 9 | 41 | 9 | ["slurm_job_id.split", "str", "int", "int", "Path", "file_path.open", "json.load", "file_path.open", "file.readlines"] | 4 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95055886_VectorInstitute_vector_inference.tests.vec_inf.client.test_utils_py.test_read_slurm_log_found", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95055886_VectorInstitute_vector_inference.tests.vec_inf.client.t... | The function (read_slurm_log) defined within the public class called public.The function start at line 43 and ends at 83. It contains 20 lines of code and it has a cyclomatic complexity of 4. It takes 4 parameters, represented as [43.0] and does not return any value. It declares 9.0 functions, It has 9.0 functions call... |
VectorInstitute_vector-inference | public | public | 0 | 0 | is_server_running | def is_server_running(slurm_job_name: str, slurm_job_id: str, log_dir: str) -> Union[str, ModelStatus, tuple[ModelStatus, str]]:"""Check if a model is ready to serve requests.Parameters----------slurm_job_name : strName of the SLURM jobslurm_job_id : strID of the SLURM joblog_dir : strDirectory containing log filesRetu... | 5 | 13 | 3 | 107 | 2 | 86 | 119 | 86 | slurm_job_name,slurm_job_id,log_dir | ['status', 'log_content'] | Union[str, ModelStatus, tuple[ModelStatus, str]] | {"AnnAssign": 1, "Assign": 3, "Expr": 1, "For": 1, "If": 3, "Return": 2} | 4 | 34 | 4 | ["read_slurm_log", "isinstance", "line.lower", "line.strip"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3701861_joeyespo_grip.grip.browser_py.wait_for_server", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95055886_VectorInstitute_vector_inference.tests.vec_inf.client.test_utils_py.test_is_server_running_statuses"] | The function (is_server_running) defined within the public class called public.The function start at line 86 and ends at 119. It contains 13 lines of code and it has a cyclomatic complexity of 5. It takes 3 parameters, represented as [86.0] and does not return any value. It declares 4.0 functions, It has 4.0 functions ... |
VectorInstitute_vector-inference | public | public | 0 | 0 | get_base_url | def get_base_url(slurm_job_name: str, slurm_job_id: str, log_dir: str) -> str:"""Get the base URL of a model.Parameters----------slurm_job_name : strName of the SLURM jobslurm_job_id : strID of the SLURM joblog_dir : strDirectory containing log filesReturns-------strBase URL of the model server or error message if not ... | 3 | 6 | 3 | 64 | 2 | 122 | 144 | 122 | slurm_job_name,slurm_job_id,log_dir | ['server_addr', 'log_content'] | str | {"Assign": 2, "Expr": 1, "If": 1, "Return": 2} | 4 | 23 | 4 | ["read_slurm_log", "isinstance", "get", "cast"] | 21 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3709410_scrapy_w3lib.tests.test_html_py.TestGetBaseUrl.test_attributes_before_href", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3709410_scrapy_w3lib.tests.test_html_py.TestGetBaseUrl.test_base_url_in_comment", "_... | The function (get_base_url) defined within the public class called public.The function start at line 122 and ends at 144. It contains 6 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [122.0] and does not return any value. It declares 4.0 functions, It has 4.0 functions call... |
VectorInstitute_vector-inference | public | public | 0 | 0 | model_health_check | def model_health_check(slurm_job_name: str, slurm_job_id: str, log_dir: str) -> tuple[ModelStatus, Union[str, int]]:"""Check the health of a running model on the cluster.Parameters----------slurm_job_name : strName of the SLURM jobslurm_job_id : strID of the SLURM joblog_dir : strDirectory containing log filesReturns--... | 4 | 14 | 3 | 122 | 3 | 147 | 180 | 147 | slurm_job_name,slurm_job_id,log_dir | ['health_check_url', 'base_url', 'response'] | tuple[ModelStatus, Union[str, int]] | {"Assign": 3, "Expr": 1, "If": 2, "Return": 4, "Try": 1} | 5 | 34 | 5 | ["get_base_url", "base_url.startswith", "base_url.replace", "requests.get", "str"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95055886_VectorInstitute_vector_inference.tests.vec_inf.client.test_utils_py.test_model_health_check", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95055886_VectorInstitute_vector_inference.tests.vec_inf.client.tes... | The function (model_health_check) defined within the public class called public.The function start at line 147 and ends at 180. It contains 14 lines of code and it has a cyclomatic complexity of 4. It takes 3 parameters, represented as [147.0] and does not return any value. It declares 5.0 functions, It has 5.0 functio... |
VectorInstitute_vector-inference | public | public | 0 | 0 | load_config.load_yaml_config | def load_yaml_config(path: Path) -> dict[str, Any]:"""Load YAML config with error handling."""try:with path.open() as f:return yaml.safe_load(f) or {}except FileNotFoundError as err:raise FileNotFoundError(f"Could not find config: {path}") from errexcept yaml.YAMLError as err:raise ValueError(f"Error parsing YAML confi... | 4 | 8 | 1 | 64 | 0 | 211 | 219 | 211 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (load_config.load_yaml_config) defined within the public class called public.The function start at line 211 and ends at 219. It contains 8 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters and does not return any value.. |
VectorInstitute_vector-inference | public | public | 0 | 0 | load_config.process_config | def process_config(config: dict[str, Any]) -> list[ModelConfig]:"""Process the config based on the config type."""return [ModelConfig(model_name=name, **model_data)for name, model_data in config.get("models", {}).items()] | 2 | 5 | 1 | 48 | 0 | 221 | 226 | 221 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (load_config.process_config) defined within the public class called public.The function start at line 221 and ends at 226. It contains 5 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value.. |
VectorInstitute_vector-inference | public | public | 0 | 0 | load_config.resolve_config_path_from_env_var | def resolve_config_path_from_env_var() -> Path | None:"""Resolve the config path from the environment variable."""config_dir = os.getenv("VEC_INF_CONFIG_DIR")config_path = os.getenv("VEC_INF_MODEL_CONFIG")if config_path:return Path(config_path)if config_dir:return Path(config_dir, "models.yaml")return None | 3 | 8 | 0 | 45 | 0 | 228 | 236 | 228 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (load_config.resolve_config_path_from_env_var) defined within the public class called public.The function start at line 228 and ends at 236. It contains 8 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value.. |
VectorInstitute_vector-inference | public | public | 0 | 0 | load_config.update_config | def update_config(config: dict[str, Any], user_config: dict[str, Any]) -> dict[str, Any]:"""Update the config with the user config."""for name, data in user_config.get("models", {}).items():if name in config.get("models", {}):config["models"][name].update(data)else:config.setdefault("models", {})[name] = datareturn con... | 3 | 9 | 2 | 91 | 0 | 238 | 248 | 238 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (load_config.update_config) defined within the public class called public.The function start at line 238 and ends at 248. It contains 9 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [238.0] and does not return any value.. |
VectorInstitute_vector-inference | public | public | 0 | 0 | load_config | def load_config(config_path: Optional[str] = None) -> list[ModelConfig]:"""Load the model configuration.Loads configuration from default and user-specified paths, merging themif both exist. User configuration takes precedence over default values.Parameters----------config_path : Optional[str]Path to the configuration f... | 6 | 25 | 1 | 129 | 6 | 183 | 275 | 183 | config_path | ['config', 'user_path', 'config_path', 'default_path', 'config_dir', 'user_config'] | list[ModelConfig] | {"Assign": 9, "Expr": 7, "For": 1, "If": 6, "Return": 8, "Try": 1, "With": 1} | 30 | 93 | 30 | ["path.open", "yaml.safe_load", "FileNotFoundError", "ValueError", "ModelConfig", "items", "config.get", "os.getenv", "os.getenv", "Path", "Path", "items", "user_config.get", "config.get", "update", "config.setdefault", "load_yaml_config", "Path", "process_config", "CACHED_CONFIG_DIR.exists", "resolve", "Path", "load_y... | 42 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3517196_debian_dput_ng.dput.configs.dputng_py.DputProfileConfig.get_config", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3517196_debian_dput_ng.dput.hook_py.get_hooks", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset... | The function (load_config) defined within the public class called public.The function start at line 183 and ends at 275. It contains 25 lines of code and it has a cyclomatic complexity of 6. The function does not take any parameters and does not return any value. It declares 30.0 functions, It has 30.0 functions called... |
VectorInstitute_vector-inference | public | public | 0 | 0 | parse_launch_output | def parse_launch_output(output: str) -> tuple[str, dict[str, str]]:"""Parse output from model launch command.Parameters----------output : strRaw output from the launch commandReturns-------tuple[str, dict[str, str]]Tuple containing:- str: SLURM job ID- dict[str, str]: Dictionary of parsed configuration parametersNotes-... | 3 | 9 | 1 | 101 | 3 | 278 | 309 | 278 | output | ['slurm_job_id', 'config_dict', 'output_lines'] | tuple[str, dict[str, str]] | {"Assign": 5, "Expr": 1, "For": 1, "If": 1, "Return": 1} | 7 | 32 | 7 | ["strip", "strip", "output.split", "output.split", "line.split", "replace", "key.lower"] | 0 | [] | The function (parse_launch_output) defined within the public class called public.The function start at line 278 and ends at 309. It contains 9 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value. It declares 7.0 functions, and It has 7.0 functi... |
VectorInstitute_vector-inference | public | public | 0 | 0 | is_power_of_two | def is_power_of_two(n: int) -> bool:"""Check if a number is a power of two.Parameters----------n : intThe number to check"""return n > 0 and (n & (n - 1)) == 0 | 2 | 2 | 1 | 26 | 0 | 312 | 320 | 312 | n | [] | bool | {"Expr": 1, "Return": 1} | 0 | 9 | 0 | [] | 0 | [] | The function (is_power_of_two) defined within the public class called public.The function start at line 312 and ends at 320. It contains 2 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value.. |
VectorInstitute_vector-inference | public | public | 0 | 0 | find_matching_dirs | def find_matching_dirs(log_dir: Path,model_family: Optional[str] = None,model_name: Optional[str] = None,job_id: Optional[int] = None,before_job_id: Optional[int] = None,) -> list[Path]:"""Find log directories based on filtering criteria.Parameters----------log_dir : PathThe base directory containing model family direc... | 24 | 35 | 5 | 218 | 2 | 323 | 387 | 323 | log_dir,model_family,model_name,job_id,before_job_id | ['matched', 'parsed_id'] | list[Path] | {"Assign": 3, "Expr": 2, "For": 2, "If": 9, "Return": 3, "Try": 1} | 10 | 65 | 10 | ["log_dir.exists", "log_dir.is_dir", "FileNotFoundError", "log_dir.iterdir", "family_dir.is_dir", "family_dir.iterdir", "job_dir.is_dir", "job_dir.name.rsplit", "int", "matched.append"] | 7 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95055886_VectorInstitute_vector_inference.tests.vec_inf.client.test_utils_py.test_find_matching_dirs_family_and_before_job_id", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95055886_VectorInstitute_vector_inference... | The function (find_matching_dirs) defined within the public class called public.The function start at line 323 and ends at 387. It contains 35 lines of code and it has a cyclomatic complexity of 24. It takes 5 parameters, represented as [323.0] and does not return any value. It declares 10.0 functions, It has 10.0 func... |
VectorInstitute_vector-inference | public | public | 0 | 0 | check_required_fields | def check_required_fields(params: dict[str, Any]) -> None:"""Check for required fields without default vals and their corresponding env vars.Parameters----------params : dict[str, Any]Dictionary of parameters to check."""for arg in REQUIRED_ARGS:if not params.get(arg):default_value = os.getenv(REQUIRED_ARGS[arg])if def... | 4 | 10 | 1 | 57 | 1 | 390 | 406 | 390 | params | ['default_value'] | None | {"Assign": 2, "Expr": 1, "For": 1, "If": 2} | 3 | 17 | 3 | ["params.get", "os.getenv", "MissingRequiredFieldsError"] | 0 | [] | The function (check_required_fields) defined within the public class called public.The function start at line 390 and ends at 406. It contains 10 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters and does not return any value. It declares 3.0 functions, and It has 3.0 fun... |
VectorInstitute_vector-inference | VecInfClient | public | 0 | 0 | __init__ | def __init__(self) -> None:"""Initialize the Vector Inference client."""pass | 1 | 2 | 1 | 9 | 0 | 82 | 84 | 82 | self | [] | None | {"Expr": 1} | 0 | 3 | 0 | [] | 14,667 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.query_py.AllocationError.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.query_py.ContentError.__init__", "_... | The function (__init__) defined within the public class called VecInfClient.The function start at line 82 and ends at 84. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It has 14667.0 functions calling this function which are... |
VectorInstitute_vector-inference | VecInfClient | public | 0 | 0 | list_models | def list_models(self) -> list[ModelInfo]:"""List all available models.Returns-------list[ModelInfo]List of ModelInfo objects containing information about available models,including their configurations and specifications."""model_registry = ModelRegistry()return model_registry.get_all_models() | 1 | 3 | 1 | 22 | 0 | 86 | 96 | 86 | self | [] | list[ModelInfo] | {"Assign": 1, "Expr": 1, "Return": 1} | 2 | 11 | 2 | ["ModelRegistry", "model_registry.get_all_models"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.unify.universal_api.clients.uni_llm_py._UniClient.__init__"] | The function (list_models) defined within the public class called VecInfClient.The function start at line 86 and ends at 96. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0 functions, It has 2.0 functions calle... |
VectorInstitute_vector-inference | VecInfClient | public | 0 | 0 | get_model_config | def get_model_config(self, model_name: str) -> ModelConfig:"""Get the configuration for a specific model.Parameters----------model_name : strName of the model to get configuration forReturns-------ModelConfigComplete configuration for the specified modelRaises------ModelNotFoundErrorIf the specified model is not found ... | 1 | 3 | 2 | 24 | 0 | 98 | 117 | 98 | self,model_name | [] | ModelConfig | {"Assign": 1, "Expr": 1, "Return": 1} | 2 | 20 | 2 | ["ModelRegistry", "model_registry.get_single_model_config"] | 3 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.70598532_awslabs_gluonts.src.gluonts.nursery.tsbench.src.evaluate_py.main", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.70598532_awslabs_gluonts.src.gluonts.nursery.tsbench.src.tsbench.evaluations.tracking._info_p... | The function (get_model_config) defined within the public class called VecInfClient.The function start at line 98 and ends at 117. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [98.0] and does not return any value. It declares 2.0 functions, It has 2.0 functi... |
VectorInstitute_vector-inference | VecInfClient | public | 0 | 0 | launch_model | def launch_model(self, model_name: str, options: Optional[LaunchOptions] = None) -> LaunchResponse:"""Launch a model on the cluster.Parameters----------model_name : strName of the model to launchoptions : LaunchOptions, optionalLaunch options to override default configurationReturns-------LaunchResponseResponse contain... | 4 | 8 | 3 | 74 | 0 | 119 | 153 | 119 | self,model_name,options | [] | LaunchResponse | {"AnnAssign": 1, "Assign": 2, "Expr": 1, "If": 1, "Return": 1} | 4 | 35 | 4 | ["items", "vars", "ModelLauncher", "model_launcher.launch"] | 0 | [] | The function (launch_model) defined within the public class called VecInfClient.The function start at line 119 and ends at 153. It contains 8 lines of code and it has a cyclomatic complexity of 4. It takes 3 parameters, represented as [119.0] and does not return any value. It declares 4.0 functions, and It has 4.0 fun... |
VectorInstitute_vector-inference | VecInfClient | public | 0 | 0 | batch_launch_models | def batch_launch_models(self,model_names: list[str],batch_config: Optional[str] = None,account: Optional[str] = None,work_dir: Optional[str] = None,) -> BatchLaunchResponse:"""Launch multiple models on the cluster.Parameters----------model_names : list[str]List of model names to launchReturns-------BatchLaunchResponseR... | 1 | 11 | 5 | 61 | 0 | 155 | 182 | 155 | self,model_names,batch_config,account,work_dir | [] | BatchLaunchResponse | {"Assign": 1, "Expr": 1, "Return": 1} | 2 | 28 | 2 | ["BatchModelLauncher", "model_launcher.launch"] | 0 | [] | The function (batch_launch_models) defined within the public class called VecInfClient.The function start at line 155 and ends at 182. It contains 11 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [155.0] and does not return any value. It declares 2.0 functions, and It has... |
VectorInstitute_vector-inference | VecInfClient | public | 0 | 0 | get_status | def get_status(self, slurm_job_id: str) -> StatusResponse:"""Get the status of a running model.Parameters----------slurm_job_id : strThe SLURM job ID to checkReturns-------StatusResponseStatus information including:- Model name- Server status- Job state- Base URL (if ready)- Error information (if failed)"""model_status... | 1 | 3 | 2 | 24 | 0 | 184 | 203 | 184 | self,slurm_job_id | [] | StatusResponse | {"Assign": 1, "Expr": 1, "Return": 1} | 2 | 20 | 2 | ["ModelStatusMonitor", "model_status_monitor.process_model_status"] | 3 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.api_py.Api.status", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16851155_pbui_bobbit.src.bobbit.modules.tweets_py.tweets_title", "_.content.gdrive.MyDrive.Phd_Thesi... | The function (get_status) defined within the public class called VecInfClient.The function start at line 184 and ends at 203. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [184.0] and does not return any value. It declares 2.0 functions, It has 2.0 functions ... |
VectorInstitute_vector-inference | VecInfClient | public | 0 | 0 | get_metrics | def get_metrics(self, slurm_job_id: str) -> MetricsResponse:"""Get the performance metrics of a running model.Parameters----------slurm_job_id : strThe SLURM job ID to get metrics forReturns-------MetricsResponseResponse containing:- Model name- Performance metrics or error message- Timestamp of collection"""performanc... | 2 | 12 | 2 | 80 | 0 | 205 | 233 | 205 | self,slurm_job_id | [] | MetricsResponse | {"AnnAssign": 1, "Assign": 3, "Expr": 1, "If": 1, "Return": 1} | 5 | 29 | 5 | ["PerformanceMetricsCollector", "performance_metrics_collector.metrics_url.startswith", "performance_metrics_collector.fetch_metrics", "MetricsResponse", "time.time"] | 0 | [] | The function (get_metrics) defined within the public class called VecInfClient.The function start at line 205 and ends at 233. It contains 12 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [205.0] and does not return any value. It declares 5.0 functions, and It has 5.0 fun... |
VectorInstitute_vector-inference | VecInfClient | public | 0 | 0 | shutdown_model | def shutdown_model(self, slurm_job_id: str) -> bool:"""Shutdown a running model.Parameters----------slurm_job_id : strThe SLURM job ID to shut downReturns-------boolTrue if the model was successfully shutdownRaises------SlurmJobErrorIf there was an error shutting down the model"""shutdown_cmd = f"scancel {slurm_job_id}... | 2 | 6 | 2 | 35 | 0 | 235 | 257 | 235 | self,slurm_job_id | [] | bool | {"Assign": 2, "Expr": 1, "If": 1, "Return": 1} | 2 | 23 | 2 | ["run_bash_command", "SlurmJobError"] | 0 | [] | The function (shutdown_model) defined within the public class called VecInfClient.The function start at line 235 and ends at 257. It contains 6 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [235.0] and does not return any value. It declares 2.0 functions, and It has 2.0 f... |
VectorInstitute_vector-inference | VecInfClient | public | 0 | 0 | wait_until_ready | def wait_until_ready(self,slurm_job_id: str,timeout_seconds: int = 1800,poll_interval_seconds: int = 10,) -> StatusResponse:"""Wait until a model is ready or fails.Parameters----------slurm_job_id : strThe SLURM job ID to wait fortimeout_seconds : int, optionalMaximum time to wait in seconds, by default 1800 (30 mins)p... | 8 | 28 | 4 | 143 | 0 | 259 | 325 | 259 | self,slurm_job_id,timeout_seconds,poll_interval_seconds | [] | StatusResponse | {"Assign": 4, "Expr": 3, "If": 5, "Return": 1, "While": 1} | 9 | 67 | 9 | ["time.time", "self.get_status", "ServerError", "ServerError", "time.time", "warnings.warn", "time.time", "ServerError", "time.sleep"] | 0 | [] | The function (wait_until_ready) defined within the public class called VecInfClient.The function start at line 259 and ends at 325. It contains 28 lines of code and it has a cyclomatic complexity of 8. It takes 4 parameters, represented as [259.0] and does not return any value. It declares 9.0 functions, and It has 9.... |
VectorInstitute_vector-inference | VecInfClient | public | 0 | 0 | cleanup_logs | def cleanup_logs(self,log_dir: Optional[Union[str, Path]] = None,model_family: Optional[str] = None,model_name: Optional[str] = None,job_id: Optional[int] = None,before_job_id: Optional[int] = None,dry_run: bool = False,) -> list[Path]:"""Remove logs from the log directory.Parameters----------log_dir : str or Path, opt... | 4 | 22 | 7 | 127 | 0 | 327 | 373 | 327 | self,log_dir,model_family,model_name,job_id,before_job_id,dry_run | [] | list[Path] | {"Assign": 2, "Expr": 2, "For": 1, "If": 1, "Return": 2} | 4 | 47 | 4 | ["Path", "Path.home", "find_matching_dirs", "shutil.rmtree"] | 0 | [] | The function (cleanup_logs) defined within the public class called VecInfClient.The function start at line 327 and ends at 373. It contains 22 lines of code and it has a cyclomatic complexity of 4. It takes 7 parameters, represented as [327.0] and does not return any value. It declares 4.0 functions, and It has 4.0 fu... |
nasa_fprime-tools | public | public | 0 | 0 | confirm | def confirm(msg):"""Ask user for a yes or no input after displaying the given message"""# Loop "forever" intendedwhile True:confirm_input = input(msg + " (yes/no) [yes]: ")# Default to yes when no inputif confirm_input.lower() in ["y", "yes", ""]:return Trueif confirm_input.lower() in ["n", "no"]:return Falseprint(f"{c... | 4 | 8 | 1 | 54 | 1 | 9 | 19 | 9 | null | ['confirm_input'] | None | null | 0 | 0 | 0 | null | 0 | null | The function (confirm) defined within the public class called public.The function start at line 9 and ends at 19. It contains 8 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters and does not return any value.. |
nasa_fprime-tools | public | public | 0 | 0 | replace_contents | def replace_contents(filename, what, replacement, count=1):"""Replace the first instance of what with replacement in filename"""changelog = Path(filename).read_text()with open(filename, "w") as fh:new_file = changelog.replace(what, replacement, count)fh.write(new_file)return new_file != changelog | 1 | 6 | 4 | 56 | 2 | 22 | 28 | 22 | null | ['changelog', 'new_file'] | None | null | 0 | 0 | 0 | null | 0 | null | The function (replace_contents) defined within the public class called public.The function start at line 22 and ends at 28. It contains 6 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [22.0] and does not return any value.. |
nasa_fprime-tools | public | public | 0 | 0 | check_path_is_within_fprime_module | def check_path_is_within_fprime_module(path: Path, is_component: bool = False):"""Check if the current working directory is within an F prime component or deployment moduleThis is done by checking if any line in the path/CMakeLists.txt file startswith register_fprime_* to identify both component and deployment modules ... | 5 | 12 | 2 | 72 | 2 | 31 | 61 | 31 | null | ['statement', 'lines'] | None | null | 0 | 0 | 0 | null | 0 | null | The function (check_path_is_within_fprime_module) defined within the public class called public.The function start at line 31 and ends at 61. It contains 12 lines of code and it has a cyclomatic complexity of 5. It takes 2 parameters, represented as [31.0] and does not return any value.. |
nasa_fprime-tools | public | public | 0 | 0 | construct_type | def construct_type(cls, name, member_type, length, format):"""Constructs a sub-array typeConstructs a new sub-type of array to represent an array of the given name, member type, length, and formatstring.Args:name: name of the array subtypemember_type: type of the members of the array subtypelength: length of the array ... | 1 | 4 | 5 | 35 | 0 | 23 | 37 | 23 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (construct_type) defined within the public class called public.The function start at line 23 and ends at 37. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [23.0] and does not return any value.. |
nasa_fprime-tools | public | public | 0 | 0 | validate | def validate(cls, val):"""Validates the values of the array"""if not isinstance(val, (tuple, list)):raise TypeMismatchException(list, type(val))if len(val) != cls.LENGTH:raise ArrayLengthException(cls.MEMBER_TYPE, cls.LENGTH, len(val))for i in range(cls.LENGTH):cls.MEMBER_TYPE.validate(val[i]) | 4 | 7 | 2 | 78 | 0 | 40 | 47 | 40 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (validate) defined within the public class called public.The function start at line 40 and ends at 47. It contains 7 lines of code and it has a cyclomatic complexity of 4. It takes 2 parameters, represented as [40.0] and does not return any value.. |
nasa_fprime-tools | public | public | 0 | 0 | val | def val(self) -> list:"""The .val property typically returns the python-native type. This the python native type closes to a serializablewithout generating full classes would be a dictionary (anonymous object). This returns such an object.:return dictionary of member names to python values of member keys"""return None ... | 3 | 2 | 1 | 28 | 0 | 50 | 57 | 50 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (val) defined within the public class called public.The function start at line 50 and ends at 57. It contains 2 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value.. |
nasa_fprime-tools | public | public | 0 | 0 | formatted_val | def formatted_val(self) -> list:"""Format all the elements of array according to the arr_format.Note 1: All elements will be cast to strNote 2: If a member is a serializable will call serializable formatted_val:return a formatted array"""result = []for item in self._val:if hasattr(item, "formatted_val"):result.append(i... | 3 | 8 | 1 | 54 | 0 | 60 | 73 | 60 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (formatted_val) defined within the public class called public.The function start at line 60 and ends at 73. It contains 8 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value.. |
nasa_fprime-tools | public | public | 0 | 0 | val | def val(self, val: list):"""The .val property typically returns the python-native type. This the python native type closes to a serializablewithout generating full classes would be a dictionary (anonymous object). This takes such an object and sets themember val list from it.:param val: dictionary containing python typ... | 2 | 4 | 2 | 35 | 0 | 76 | 86 | 76 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (val) defined within the public class called public.The function start at line 76 and ends at 86. It contains 4 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [76.0] and does not return any value.. |
nasa_fprime-tools | public | public | 0 | 0 | to_jsonable | def to_jsonable(self):"""JSONable array object format"""return {"name": self.__class__.__name__,"type": self.__class__.__name__,"size": self.LENGTH,"format": self.FORMAT,"values": (Noneif self._val is Noneelse [member.to_jsonable() for member in self._val]),} | 3 | 12 | 1 | 63 | 0 | 88 | 102 | 88 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (to_jsonable) defined within the public class called public.The function start at line 88 and ends at 102. It contains 12 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value.. |
nasa_fprime-tools | public | public | 0 | 0 | serialize | def serialize(self):"""Serialize the array by serializing the elements one by one"""if self.val is None:raise NotInitializedException(type(self))return b"".join([item.serialize() for item in self._val]) | 3 | 4 | 1 | 41 | 0 | 104 | 108 | 104 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (serialize) defined within the public class called public.The function start at line 104 and ends at 108. It contains 4 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value.. |
nasa_fprime-tools | public | public | 0 | 0 | deserialize | def deserialize(self, data, offset):"""Deserialize the members of the array"""values = []for field_index in range(self.LENGTH):try:item = self.MEMBER_TYPE()item.deserialize(data, offset)offset += item.getSize()values.append(item)except Exception as exc:raise DeserializeException(f"Array index {field_index} failed to de... | 3 | 13 | 3 | 70 | 0 | 110 | 123 | 110 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (deserialize) defined within the public class called public.The function start at line 110 and ends at 123. It contains 13 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [110.0] and does not return any value.. |
nasa_fprime-tools | public | public | 0 | 0 | getSize | def getSize(self):"""Return the size in bytes of the array"""return sum(item.getSize() for item in self._val) | 2 | 2 | 1 | 21 | 0 | 125 | 127 | 125 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (getSize) defined within the public class called public.The function start at line 125 and ends at 127. It contains 2 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value.. |
nasa_fprime-tools | public | public | 0 | 0 | getMaxSize | def getMaxSize(cls):"""Return the maximum size in bytes of the array"""return cls.MEMBER_TYPE.getMaxSize() * cls.LENGTH | 1 | 2 | 1 | 18 | 0 | 130 | 132 | 130 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (getMaxSize) defined within the public class called public.The function start at line 130 and ends at 132. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
nasa_fprime-tools | public | public | 0 | 0 | __iter__ | def __iter__(self):"""Allow the array object to be iterated"""return iter(self._val) | 1 | 2 | 1 | 13 | 0 | 134 | 136 | 134 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (__iter__) defined within the public class called public.The function start at line 134 and ends at 136. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
nasa_fprime-tools | public | public | 0 | 0 | validate | def validate(cls, val):"""Validate the given class"""if not isinstance(val, bool):raise TypeMismatchException(bool, type(val)) | 2 | 3 | 2 | 27 | 0 | 27 | 30 | 27 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (validate) defined within the public class called public.The function start at line 27 and ends at 30. It contains 3 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [27.0] and does not return any value.. |
nasa_fprime-tools | public | public | 0 | 0 | serialize | def serialize(self):"""Serialize a boolean value"""if self._val is None:raise NotInitializedException(type(self))return struct.pack("B", self.TRUE if self._val else self.FALSE) | 3 | 4 | 1 | 40 | 0 | 32 | 36 | 32 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (serialize) defined within the public class called public.The function start at line 32 and ends at 36. It contains 4 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value.. |
nasa_fprime-tools | public | public | 0 | 0 | deserialize | def deserialize(self, data, offset):"""Deserialize boolean value"""try:int_val = struct.unpack_from("B", data, offset)[0]if int_val not in [self.TRUE, self.FALSE]:raise TypeRangeException(int_val)self._val = int_val == self.TRUEexcept struct.error:raise DeserializeException("Not enough bytes to deserialize bool.") | 3 | 8 | 3 | 65 | 0 | 38 | 46 | 38 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (deserialize) defined within the public class called public.The function start at line 38 and ends at 46. It contains 8 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [38.0] and does not return any value.. |
nasa_fprime-tools | public | public | 0 | 0 | getSize | def getSize(cls):return struct.calcsize("B") | 1 | 2 | 1 | 12 | 0 | 49 | 50 | 49 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (getSize) defined within the public class called public.The function start at line 49 and ends at 50. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
nasa_fprime-tools | public | public | 0 | 0 | getMaxSize | def getMaxSize(cls):"""Maximum size of type"""return cls.getSize()# Always the same as getSize | 1 | 2 | 1 | 12 | 0 | 53 | 55 | 53 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (getMaxSize) defined within the public class called public.The function start at line 53 and ends at 55. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
nasa_fprime-tools | public | public | 0 | 0 | construct_type | def construct_type(cls, name, enum_dict, rep_type="I32"):"""Construct the custom enum typeConstructs the custom enumeration type, with the supplied enumeration dictionary.Args:name: name of the enumeration typeenum_dict: enumeration: value dictionary defining the enumerationrep_type: representation type (standard Fprim... | 9 | 21 | 4 | 175 | 0 | 35 | 67 | 35 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (construct_type) defined within the public class called public.The function start at line 35 and ends at 67. It contains 21 lines of code and it has a cyclomatic complexity of 9. It takes 4 parameters, represented as [35.0] and does not return any value.. |
nasa_fprime-tools | public | public | 0 | 0 | validate | def validate(cls, val):"""Validate the value passed into the enumeration"""if not isinstance(val, str):raise TypeMismatchException(str, type(val))if val not in cls.keys():raise EnumMismatchException(cls.__class__.__name__, val) | 3 | 5 | 2 | 48 | 0 | 70 | 75 | 70 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (validate) defined within the public class called public.The function start at line 70 and ends at 75. It contains 5 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [70.0] and does not return any value.. |
nasa_fprime-tools | public | public | 0 | 0 | keys | def keys(cls):"""Return all the enum key values."""return list(cls.ENUM_DICT.keys()) | 1 | 2 | 1 | 17 | 0 | 78 | 82 | 78 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (keys) defined within the public class called public.The function start at line 78 and ends at 82. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
nasa_fprime-tools | public | public | 0 | 0 | serialize | def serialize(self):"""Serialize the enumeration type using an int type"""# for enums, take the string value and convert it to# the numeric equivalentif self._val is None or (self._val == "UNDEFINED" and "UNDEFINED" not in self.ENUM_DICT):raise NotInitializedException(type(self))return struct.pack(REPRESENTATION_TYPE_M... | 4 | 9 | 1 | 62 | 0 | 84 | 97 | 84 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (serialize) defined within the public class called public.The function start at line 84 and ends at 97. It contains 9 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters and does not return any value.. |
nasa_fprime-tools | public | public | 0 | 0 | deserialize | def deserialize(self, data, offset):"""Deserialize the enumeration using an int type"""try:int_val = struct.unpack_from(REPRESENTATION_TYPE_MAP[self.REP_TYPE].get_serialize_format(),data,offset,)[0]except struct.error:msg = f"Could not deserialize enum value. Needed: {self.getSize()} bytes Found: {len(data[offset:])}"r... | 4 | 16 | 3 | 82 | 0 | 99 | 119 | 99 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (deserialize) defined within the public class called public.The function start at line 99 and ends at 119. It contains 16 lines of code and it has a cyclomatic complexity of 4. It takes 3 parameters, represented as [99.0] and does not return any value.. |
nasa_fprime-tools | public | public | 0 | 0 | getSize | def getSize(self):"""Calculates the size based on the size of an integer used to store it"""return struct.calcsize(REPRESENTATION_TYPE_MAP[self.REP_TYPE].get_serialize_format()) | 1 | 4 | 1 | 22 | 0 | 121 | 125 | 121 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (getSize) defined within the public class called public.The function start at line 121 and ends at 125. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
nasa_fprime-tools | public | public | 0 | 0 | getMaxSize | def getMaxSize(cls):"""Maximum size of type"""return struct.calcsize(REPRESENTATION_TYPE_MAP[cls.REP_TYPE].get_serialize_format()) | 1 | 4 | 1 | 22 | 0 | 128 | 132 | 128 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (getMaxSize) defined within the public class called public.The function start at line 128 and ends at 132. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.