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
TestBatchModelLauncher
public
0
0
test_launch_params_log_file_paths
def test_launch_params_log_file_paths(self, mock_load_config, batch_model_configs):"""Test that log file paths are constructed correctly."""mock_load_config.return_value = batch_model_configslauncher = BatchModelLauncher(["family1-variant1", "family2-variant1"],account="test-account",work_dir="/tmp/test-work",)params =...
1
34
3
143
0
541
581
541
self,mock_load_config,batch_model_configs
[]
None
{"Assign": 3, "Expr": 1}
2
41
2
["BatchModelLauncher", "patch"]
0
[]
The function (test_launch_params_log_file_paths) defined within the public class called TestBatchModelLauncher.The function start at line 541 and ends at 581. It contains 34 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [541.0] and does not return any value. It declares 2....
VectorInstitute_vector-inference
TestBatchModelLauncher
public
0
0
test_init_with_batch_config
def test_init_with_batch_config(self, mock_load_config, batch_model_configs):"""Test launcher initializes correctly with custom batch config."""mock_load_config.return_value = batch_model_configslauncher = BatchModelLauncher(["family1-variant1", "family2-variant1"],batch_config="custom_config.yaml",account="test-accoun...
1
10
3
50
0
584
597
584
self,mock_load_config,batch_model_configs
[]
None
{"Assign": 2, "Expr": 2}
3
14
3
["BatchModelLauncher", "mock_load_config.assert_called_with", "patch"]
0
[]
The function (test_init_with_batch_config) defined within the public class called TestBatchModelLauncher.The function start at line 584 and ends at 597. It contains 10 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [584.0] and does not return any value. It declares 3.0 func...
VectorInstitute_vector-inference
TestModelStatusMonitor
public
0
0
mock_scontrol_output
def mock_scontrol_output(self):"""Fixture returning mock `scontrol` output for a running SLURM job."""return "JobId=12345 JobName=test-model UserId=user(1000) GroupId=group(1000) MCS_label=N/A Priority=1 Nice=0 Account=account QOS=normal JobState=RUNNING Reason=None Dependency=(null) Requeue=1 Restarts=0 BatchFlag=1 Re...
1
2
1
8
0
604
606
604
self
[]
Returns
{"Expr": 1, "Return": 1}
0
3
0
[]
0
[]
The function (mock_scontrol_output) defined within the public class called TestModelStatusMonitor.The function start at line 604 and ends at 606. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value..
VectorInstitute_vector-inference
TestModelStatusMonitor
public
0
0
mock_pending_scontrol_output
def mock_pending_scontrol_output(self):"""Fixture returning mock scontrol output for a pending job."""return "JobId=12345 JobName=test-model UserId=user(1000) GroupId=group(1000) MCS_label=N/A Priority=1 Nice=0 Account=account QOS=normal JobState=PENDING Reason=Resources NodeList=(null) BatchHost=gpu01 NumNodes=1 NumCP...
1
2
1
8
0
609
611
609
self
[]
Returns
{"Expr": 1, "Return": 1}
0
3
0
[]
0
[]
The function (mock_pending_scontrol_output) defined within the public class called TestModelStatusMonitor.The function start at line 609 and ends at 611. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value..
VectorInstitute_vector-inference
TestModelStatusMonitor
public
0
0
test_init_sets_fields_correctly
def test_init_sets_fields_correctly(self, mock_run_bash, mock_scontrol_output):"""Test __init__ sets job ID, output, and initial status info."""mock_run_bash.return_value = (mock_scontrol_output, "")monitor = ModelStatusMonitor(slurm_job_id="12345")assert monitor.slurm_job_id == "12345"assert monitor.output == mock_sco...
1
10
3
79
0
614
626
614
self,mock_run_bash,mock_scontrol_output
[]
None
{"Assign": 2, "Expr": 1}
2
13
2
["ModelStatusMonitor", "patch"]
0
[]
The function (test_init_sets_fields_correctly) defined within the public class called TestModelStatusMonitor.The function start at line 614 and ends at 626. It contains 10 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [614.0] and does not return any value. It declares 2.0 ...
VectorInstitute_vector-inference
TestModelStatusMonitor
public
0
0
test_init_with_slurm_error
def test_init_with_slurm_error(self, mock_run_bash):"""Test __init__ raises error when SLURM command returns stderr."""mock_run_bash.return_value = ("", "scontrol: error: Invalid job id specified")with pytest.raises(SlurmJobError):ModelStatusMonitor("99999")
1
4
2
29
0
629
634
629
self,mock_run_bash
[]
None
{"Assign": 1, "Expr": 2, "With": 1}
3
6
3
["pytest.raises", "ModelStatusMonitor", "patch"]
0
[]
The function (test_init_with_slurm_error) defined within the public class called TestModelStatusMonitor.The function start at line 629 and ends at 634. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [629.0] and does not return any value. It declares 3.0 functi...
VectorInstitute_vector-inference
TestModelStatusMonitor
public
0
0
test_process_pending_state
def test_process_pending_state(self, mock_run_bash, mock_pending_scontrol_output):"""Test pending job sets server status and pending reason correctly."""mock_run_bash.return_value = (mock_pending_scontrol_output, "")monitor = ModelStatusMonitor(12345)status = monitor.process_model_status()assert status.server_status ==...
1
6
3
46
0
637
645
637
self,mock_run_bash,mock_pending_scontrol_output
[]
None
{"Assign": 3, "Expr": 1}
3
9
3
["ModelStatusMonitor", "monitor.process_model_status", "patch"]
0
[]
The function (test_process_pending_state) defined within the public class called TestModelStatusMonitor.The function start at line 637 and ends at 645. It contains 6 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [637.0] and does not return any value. It declares 3.0 functi...
VectorInstitute_vector-inference
TestModelStatusMonitor
public
0
0
test_process_running_state_server_ready
def test_process_running_state_server_ready(self,mock_get_base_url,mock_health_check,mock_is_server_running,mock_run_bash,mock_scontrol_output,):"""Test READY status and base URL are set when server is healthy and running."""mock_run_bash.return_value = (mock_scontrol_output, "")mock_is_server_running.return_value = "R...
1
16
6
74
0
651
669
651
self,mock_get_base_url,mock_health_check,mock_is_server_running,mock_run_bash,mock_scontrol_output
[]
None
{"Assign": 6, "Expr": 1}
6
19
6
["ModelStatusMonitor", "monitor.process_model_status", "patch", "patch", "patch", "patch"]
0
[]
The function (test_process_running_state_server_ready) defined within the public class called TestModelStatusMonitor.The function start at line 651 and ends at 669. It contains 16 lines of code and it has a cyclomatic complexity of 1. It takes 6 parameters, represented as [651.0] and does not return any value. It decla...
VectorInstitute_vector-inference
TestModelStatusMonitor
public
0
0
test_process_running_state_server_failed
def test_process_running_state_server_failed(self, mock_is_server_running, mock_run_bash, mock_scontrol_output):"""Test that FAILED status and reason are set when server startup fails."""mock_run_bash.return_value = (mock_scontrol_output, "")mock_is_server_running.return_value = (ModelStatus.FAILED,"RuntimeError: CUDA ...
1
12
4
60
0
673
687
673
self,mock_is_server_running,mock_run_bash,mock_scontrol_output
[]
None
{"Assign": 4, "Expr": 1}
4
15
4
["ModelStatusMonitor", "monitor.process_model_status", "patch", "patch"]
0
[]
The function (test_process_running_state_server_failed) defined within the public class called TestModelStatusMonitor.The function start at line 673 and ends at 687. It contains 12 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [673.0] and does not return any value. It decl...
VectorInstitute_vector-inference
TestModelStatusMonitor
public
0
0
test_process_running_state_health_check_failed
def test_process_running_state_health_check_failed(self,mock_health_check,mock_is_server_running,mock_run_bash,mock_scontrol_output,):"""Test FAILED status is set when health check fails with non-200 response."""mock_run_bash.return_value = (mock_scontrol_output, "")mock_is_server_running.return_value = "RUNNING"mock_h...
1
14
5
67
0
692
708
692
self,mock_health_check,mock_is_server_running,mock_run_bash,mock_scontrol_output
[]
None
{"Assign": 5, "Expr": 1}
5
17
5
["ModelStatusMonitor", "monitor.process_model_status", "patch", "patch", "patch"]
0
[]
The function (test_process_running_state_health_check_failed) defined within the public class called TestModelStatusMonitor.The function start at line 692 and ends at 708. It contains 14 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [692.0] and does not return any value. I...
VectorInstitute_vector-inference
public
public
0
0
mock_status_response
def mock_status_response():"""Fixture returning a mock StatusResponse instance."""return StatusResponse(model_name="test-model",log_dir="/tmp/test_logs",# Add this lineserver_status=ModelStatus.UNAVAILABLE,job_state="RUNNING",raw_output="mock scontrol output",base_url="http://gpu01:8000/v1",pending_reason=None,failed_r...
1
11
0
43
0
712
723
712
[]
Returns
{"Expr": 1, "Return": 1}
1
12
1
["StatusResponse"]
0
[]
The function (mock_status_response) defined within the public class called public.The function start at line 712 and ends at 723. It contains 11 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declare 1.0 function, and It has 1.0 fu...
VectorInstitute_vector-inference
TestPerformanceMetricsCollector
public
0
0
mock_metrics_text
def mock_metrics_text(self):"""Fixture returning a sample metrics text used for parsing tests."""return """\vllm:prompt_tokens_total{engine="0",model_name="test-model"} 5000.0vllm:generation_tokens_total{engine="0",model_name="test-model"} 1000.0vllm:e2e_request_latency_seconds_sum{engine="0",model_name="test-model"} 6...
1
12
1
8
0
730
742
730
self
[]
Returns
{"Expr": 1, "Return": 1}
0
13
0
[]
0
[]
The function (mock_metrics_text) defined within the public class called TestPerformanceMetricsCollector.The function start at line 730 and ends at 742. It contains 12 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value..
VectorInstitute_vector-inference
TestPerformanceMetricsCollector
public
0
0
test_init
def test_init(self, mock_status_monitor, mock_status_response):"""Test __init__ sets default state and initializes from model status."""mock_status_monitor.return_value.process_model_status.return_value = (mock_status_response)collector = PerformanceMetricsCollector("12345")assert collector.slurm_job_id == "12345"asser...
1
10
3
61
0
745
757
745
self,mock_status_monitor,mock_status_response
[]
None
{"Assign": 2, "Expr": 1}
2
13
2
["PerformanceMetricsCollector", "patch"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3564484_cornell_brg_pydgin.riscv.riscv_sim_py.RiscVSim.init_state"]
The function (test_init) defined within the public class called TestPerformanceMetricsCollector.The function start at line 745 and ends at 757. It contains 10 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [745.0] and does not return any value. It declares 2.0 functions, It...
VectorInstitute_vector-inference
TestPerformanceMetricsCollector
public
0
0
test_init_check_prefix_caching_enabled
def test_init_check_prefix_caching_enabled(self, mock_read_slurm_log, mock_status_monitor, mock_status_response):"""Test __init__ when enable prefix caching is True."""mock_status_monitor.return_value.process_model_status.return_value = (mock_status_response)mock_read_slurm_log.return_value = {"enable_prefix_caching": ...
1
13
4
72
0
761
776
761
self,mock_read_slurm_log,mock_status_monitor,mock_status_response
[]
None
{"Assign": 3, "Expr": 1}
3
16
3
["PerformanceMetricsCollector", "patch", "patch"]
0
[]
The function (test_init_check_prefix_caching_enabled) defined within the public class called TestPerformanceMetricsCollector.The function start at line 761 and ends at 776. It contains 13 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [761.0] and does not return any value. ...
VectorInstitute_vector-inference
TestPerformanceMetricsCollector
public
0
0
test_build_metrics_url_pending
def test_build_metrics_url_pending(self, mock_get_base_url, mock_status_monitor, mock_status_response):"""Test metrics URL returns placeholder when job is pending."""mock_status_response.job_state = ModelStatus.PENDINGmock_status_monitor.return_value.process_model_status.return_value = (mock_status_response)collector =...
1
9
4
42
0
780
791
780
self,mock_get_base_url,mock_status_monitor,mock_status_response
[]
None
{"Assign": 3, "Expr": 1}
3
12
3
["PerformanceMetricsCollector", "patch", "patch"]
0
[]
The function (test_build_metrics_url_pending) defined within the public class called TestPerformanceMetricsCollector.The function start at line 780 and ends at 791. It contains 9 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [780.0] and does not return any value. It declar...
VectorInstitute_vector-inference
TestPerformanceMetricsCollector
public
0
0
test_build_metrics_url_running
def test_build_metrics_url_running(self, mock_get_base_url, mock_status_monitor, mock_status_response):"""Test metrics URL is built correctly when job is running."""mock_status_monitor.return_value.process_model_status.return_value = (mock_status_response)mock_get_base_url.return_value = "http://gpu01:8000/v1"collector...
1
9
4
40
0
795
806
795
self,mock_get_base_url,mock_status_monitor,mock_status_response
[]
None
{"Assign": 3, "Expr": 1}
3
12
3
["PerformanceMetricsCollector", "patch", "patch"]
0
[]
The function (test_build_metrics_url_running) defined within the public class called TestPerformanceMetricsCollector.The function start at line 795 and ends at 806. It contains 9 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [795.0] and does not return any value. It declar...
VectorInstitute_vector-inference
TestPerformanceMetricsCollector
public
0
0
test_parse_metrics
def test_parse_metrics(self, mock_status_monitor, mock_metrics_text, mock_status_response):"""Test parsing of raw metrics text into structured dictionary values."""mock_status_monitor.return_value.process_model_status.return_value = (mock_status_response)collector = PerformanceMetricsCollector("12345")parsed = collecto...
1
14
4
91
0
809
826
809
self,mock_status_monitor,mock_metrics_text,mock_status_response
[]
None
{"Assign": 3, "Expr": 1}
3
18
3
["PerformanceMetricsCollector", "collector._parse_metrics", "patch"]
0
[]
The function (test_parse_metrics) defined within the public class called TestPerformanceMetricsCollector.The function start at line 809 and ends at 826. It contains 14 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [809.0] and does not return any value. It declares 3.0 func...
VectorInstitute_vector-inference
TestPerformanceMetricsCollector
public
0
0
test_fetch_metrics_second_call
def test_fetch_metrics_second_call(self,mock_time,mock_requests_get,mock_status_monitor,mock_metrics_text,mock_status_response,):"""Test throughput calculation between two fetch_metrics calls."""mock_time.return_value = 1000.0mock_status_monitor.return_value.process_model_status.return_value = (mock_status_response)moc...
1
47
6
217
0
831
881
831
self,mock_time,mock_requests_get,mock_status_monitor,mock_metrics_text,mock_status_response
[]
None
{"Assign": 11, "Expr": 2}
9
51
9
["MagicMock", "PerformanceMetricsCollector", "collector.fetch_metrics", "collector.fetch_metrics", "pytest.approx", "pytest.approx", "patch", "patch", "patch"]
0
[]
The function (test_fetch_metrics_second_call) defined within the public class called TestPerformanceMetricsCollector.The function start at line 831 and ends at 881. It contains 47 lines of code and it has a cyclomatic complexity of 1. It takes 6 parameters, represented as [831.0] and does not return any value. It decla...
VectorInstitute_vector-inference
TestPerformanceMetricsCollector
public
0
0
test_fetch_metrics_request_exception
def test_fetch_metrics_request_exception(self, mock_requests_get, mock_status_monitor):"""Test that fetch_metrics handles request exceptions."""mock_status = MagicMock()mock_status_monitor.return_value.process_model_status.return_value = mock_statusmock_requests_get.side_effect = requests.RequestException("Connection r...
1
12
3
67
0
885
900
885
self,mock_requests_get,mock_status_monitor
[]
None
{"Assign": 6, "Expr": 1}
7
16
7
["MagicMock", "requests.RequestException", "PerformanceMetricsCollector", "collector.fetch_metrics", "isinstance", "patch", "patch"]
0
[]
The function (test_fetch_metrics_request_exception) defined within the public class called TestPerformanceMetricsCollector.The function start at line 885 and ends at 900. It contains 12 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [885.0] and does not return any value. It...
VectorInstitute_vector-inference
TestModelLauncher
public
0
0
mock_configs
def mock_configs(self):"""Return a list of mock ModelConfig for testing."""return [ModelConfig(model_name="model1",model_family="family1",model_variant="variant1",model_type="LLM",gpus_per_node=1,num_nodes=1,vocab_size=32000,model_weights_parent_dir=Path("/path/to/models"),resource_type="l40s",partition="gpu",qos="norm...
1
39
1
151
0
907
946
907
self,model_config
[]
Returns
{"Expr": 1, "Return": 1}
0
3
0
[]
0
[]
The function (mock_configs) defined within the public class called TestModelLauncher.The function start at line 907 and ends at 946. It contains 39 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value..
VectorInstitute_vector-inference
TestPerformanceMetricsCollector
public
0
0
test_init
def test_init(self, mock_load_config, mock_configs):"""Test ModelRegistry init."""mock_load_config.return_value = mock_configsregistry = ModelRegistry()assert registry.model_configs[0].model_name == "model1"assert registry.model_configs[1].model_name == "model2"
1
5
3
42
0
949
956
949
self,mock_status_monitor,mock_status_response
[]
None
{"Assign": 2, "Expr": 1}
2
13
2
["PerformanceMetricsCollector", "patch"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3564484_cornell_brg_pydgin.riscv.riscv_sim_py.RiscVSim.init_state"]
The function (test_init) defined within the public class called TestPerformanceMetricsCollector.The function start at line 949 and ends at 956. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [949.0] and does not return any value. It declares 2.0 functions, It ...
VectorInstitute_vector-inference
TestModelRegistry
public
0
0
test_get_all_models
def test_get_all_models(self, mock_load_config, mock_configs):"""Test get_all_models returns correct model info."""mock_load_config.return_value = mock_configsregistry = ModelRegistry()models = registry.get_all_models()assert len(models) == 2assert models[0].name == "model1"assert models[0].family == "family1"assert mo...
1
13
3
110
0
959
975
959
self,mock_load_config,mock_configs
[]
None
{"Assign": 3, "Expr": 1}
4
17
4
["ModelRegistry", "registry.get_all_models", "len", "patch"]
0
[]
The function (test_get_all_models) defined within the public class called TestModelRegistry.The function start at line 959 and ends at 975. It contains 13 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [959.0] and does not return any value. It declares 4.0 functions, and I...
VectorInstitute_vector-inference
TestModelRegistry
public
0
0
test_get_single_model_config
def test_get_single_model_config(self, mock_load_config, mock_configs):"""Test retrieving the config for an existing model."""mock_load_config.return_value = mock_configsregistry = ModelRegistry()config = registry.get_single_model_config("model1")assert config.model_name == "model1"assert config.model_family == "family...
1
7
3
46
0
978
987
978
self,mock_load_config,mock_configs
[]
None
{"Assign": 3, "Expr": 1}
3
10
3
["ModelRegistry", "registry.get_single_model_config", "patch"]
0
[]
The function (test_get_single_model_config) defined within the public class called TestModelRegistry.The function start at line 978 and ends at 987. It contains 7 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [978.0] and does not return any value. It declares 3.0 functions...
VectorInstitute_vector-inference
TestModelRegistry
public
0
0
test_get_single_model_config_not_found
def test_get_single_model_config_not_found(self, mock_load_config, mock_configs):"""Test retrieving a config for a non-existent model."""mock_load_config.return_value = mock_configsregistry = ModelRegistry()with pytest.raises(ModelNotFoundError):registry.get_single_model_config("nonexistent_model")
1
5
3
34
0
990
997
990
self,mock_load_config,mock_configs
[]
None
{"Assign": 2, "Expr": 2, "With": 1}
4
8
4
["ModelRegistry", "pytest.raises", "registry.get_single_model_config", "patch"]
0
[]
The function (test_get_single_model_config_not_found) defined within the public class called TestModelRegistry.The function start at line 990 and ends at 997. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [990.0] and does not return any value. It declares 4.0...
VectorInstitute_vector-inference
public
public
0
0
test_model_info_creation
def test_model_info_creation():"""Test creating a ModelInfo instance."""model = ModelInfo(name="test-model",family="test-family",variant="test-variant",model_type=ModelType.LLM,config={"gpus_per_node": 1},)assert model.name == "test-model"assert model.family == "test-family"assert model.variant == "test-variant"assert ...
1
13
0
71
1
6
20
6
['model']
None
{"Assign": 1, "Expr": 1}
1
15
1
["ModelInfo"]
0
[]
The function (test_model_info_creation) defined within the public class called public.The function start at line 6 and ends at 20. It contains 13 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 1.0 funct...
VectorInstitute_vector-inference
public
public
0
0
test_model_info_optional_fields
def test_model_info_optional_fields():"""Test ModelInfo with optional fields omitted."""model = ModelInfo(name="test-model",family="test-family",variant=None,model_type=ModelType.LLM,config={},)assert model.name == "test-model"assert model.family == "test-family"assert model.variant is Noneassert model.model_type == Mo...
1
12
0
59
1
23
36
23
['model']
None
{"Assign": 1, "Expr": 1}
1
14
1
["ModelInfo"]
0
[]
The function (test_model_info_optional_fields) defined within the public class called public.The function start at line 23 and ends at 36. It contains 12 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 1...
VectorInstitute_vector-inference
public
public
0
0
test_launch_options_default_values
def test_launch_options_default_values():"""Test LaunchOptions with default values."""options = LaunchOptions()assert options.gpus_per_node is Noneassert options.partition is Noneassert options.data_type is Noneassert options.num_nodes is Noneassert options.model_family is None
1
7
0
40
1
39
47
39
['options']
None
{"Assign": 1, "Expr": 1}
1
9
1
["LaunchOptions"]
0
[]
The function (test_launch_options_default_values) defined within the public class called public.The function start at line 39 and ends at 47. It contains 7 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
public
public
0
0
test_model_status_enum
def test_model_status_enum():"""Test ModelStatus enum values."""assert ModelStatus.PENDING.value == "PENDING"assert ModelStatus.LAUNCHING.value == "LAUNCHING"assert ModelStatus.READY.value == "READY"assert ModelStatus.FAILED.value == "FAILED"assert ModelStatus.SHUTDOWN.value == "SHUTDOWN"
1
6
0
45
0
50
56
50
[]
None
{"Expr": 1}
0
7
0
[]
0
[]
The function (test_model_status_enum) defined within the public class called public.The function start at line 50 and ends at 56. 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..
VectorInstitute_vector-inference
TestSlurmScriptGenerator
public
0
0
basic_params
def basic_params(self):"""Generate basic SLURM configuration parameters."""return {"model_name": "test-model","model_weights_parent_dir": "/path/to/model_weights","src_dir": "/path/to/src","log_dir": "/path/to/logs","num_nodes": "1","venv": "/path/to/venv","gpus_per_node": "4","partition": "gpu","account": "test-accoun...
1
18
1
66
0
19
37
19
self
[]
Returns
{"Expr": 1, "Return": 1}
0
19
0
[]
0
[]
The function (basic_params) defined within the public class called TestSlurmScriptGenerator.The function start at line 19 and ends at 37. It contains 18 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value..
VectorInstitute_vector-inference
TestSlurmScriptGenerator
public
0
0
multinode_params
def multinode_params(self, basic_params):"""Generate multi-node SLURM configuration parameters."""multinode = basic_params.copy()multinode.update({"num_nodes": "2",})return multinode
1
8
2
28
0
40
48
40
self,basic_params
[]
Returns
{"Assign": 1, "Expr": 2, "Return": 1}
2
9
2
["basic_params.copy", "multinode.update"]
0
[]
The function (multinode_params) defined within the public class called TestSlurmScriptGenerator.The function start at line 40 and ends at 48. It contains 8 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [40.0], and this function return a value. It declares 2.0 functions, an...
VectorInstitute_vector-inference
TestSlurmScriptGenerator
public
0
0
singularity_params
def singularity_params(self, basic_params):"""Generate singularity-based SLURM configuration parameters."""singularity = basic_params.copy()singularity.update({"venv": "singularity","bind": "/scratch:/scratch,/data:/data","env": {"CACHE_DIR": "/cache","MY_VAR": "5","VLLM_CACHE_ROOT": "/cache/vllm",},})return singularit...
1
14
2
49
0
51
65
51
self,basic_params
[]
Returns
{"Assign": 1, "Expr": 2, "Return": 1}
2
15
2
["basic_params.copy", "singularity.update"]
0
[]
The function (singularity_params) defined within the public class called TestSlurmScriptGenerator.The function start at line 51 and ends at 65. It contains 14 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [51.0], and this function return a value. It declares 2.0 functions,...
VectorInstitute_vector-inference
TestSlurmScriptGenerator
public
0
0
temp_log_dir
def temp_log_dir(self):"""Generate temporary directory for log files."""with tempfile.TemporaryDirectory() as tmpdir:yield Path(tmpdir)
1
3
1
20
0
68
71
68
self
[]
None
{"Expr": 2, "With": 1}
2
4
2
["tempfile.TemporaryDirectory", "Path"]
0
[]
The function (temp_log_dir) defined within the public class called TestSlurmScriptGenerator.The function start at line 68 and ends at 71. 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
TestSlurmScriptGenerator
public
0
0
test_init_single_node
def test_init_single_node(self, basic_params):"""Test initialization with single-node configuration."""generator = SlurmScriptGenerator(basic_params)assert generator.params == basic_paramsassert not generator.is_multinodeassert not generator.use_containerassert generator.additional_binds == ""assert generator.model_wei...
1
8
2
48
0
73
82
73
self,basic_params
[]
None
{"Assign": 1, "Expr": 1}
1
10
1
["SlurmScriptGenerator"]
0
[]
The function (test_init_single_node) defined within the public class called TestSlurmScriptGenerator.The function start at line 73 and ends at 82. It contains 8 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [73.0] and does not return any value. It declare 1.0 function, and...
VectorInstitute_vector-inference
TestSlurmScriptGenerator
public
0
0
test_init_multinode
def test_init_multinode(self, multinode_params):"""Test initialization with multi-node configuration."""generator = SlurmScriptGenerator(multinode_params)assert generator.params == multinode_paramsassert generator.is_multinodeassert not generator.use_containerassert generator.additional_binds == ""assert generator.mode...
1
8
2
47
0
84
93
84
self,multinode_params
[]
None
{"Assign": 1, "Expr": 1}
1
10
1
["SlurmScriptGenerator"]
0
[]
The function (test_init_multinode) defined within the public class called TestSlurmScriptGenerator.The function start at line 84 and ends at 93. It contains 8 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [84.0] and does not return any value. It declare 1.0 function, and ...
VectorInstitute_vector-inference
TestSlurmScriptGenerator
public
0
0
test_init_singularity
def test_init_singularity(self, singularity_params):"""Test initialization with Singularity configuration."""generator = SlurmScriptGenerator(singularity_params)assert generator.params == singularity_paramsassert generator.use_containerassert not generator.is_multinodeassert generator.additional_binds == " --bind /scra...
1
11
2
49
0
95
107
95
self,singularity_params
[]
None
{"Assign": 1, "Expr": 1}
1
13
1
["SlurmScriptGenerator"]
0
[]
The function (test_init_singularity) defined within the public class called TestSlurmScriptGenerator.The function start at line 95 and ends at 107. It contains 11 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [95.0] and does not return any value. It declare 1.0 function, a...
VectorInstitute_vector-inference
TestSlurmScriptGenerator
public
0
0
test_init_singularity_no_bind
def test_init_singularity_no_bind(self, basic_params):"""Test Singularity initialization without additional binds."""params = basic_params.copy()params["venv"] = "singularity"generator = SlurmScriptGenerator(params)assert generator.params == paramsassert generator.use_containerassert not generator.is_multinodeassert ge...
1
10
2
60
0
109
120
109
self,basic_params
[]
None
{"Assign": 3, "Expr": 1}
2
12
2
["basic_params.copy", "SlurmScriptGenerator"]
0
[]
The function (test_init_singularity_no_bind) defined within the public class called TestSlurmScriptGenerator.The function start at line 109 and ends at 120. It contains 10 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [109.0] and does not return any value. It declares 2.0 ...
VectorInstitute_vector-inference
TestSlurmScriptGenerator
public
0
0
test_generate_shebang_single_node
def test_generate_shebang_single_node(self, basic_params):"""Test shebang generation for single-node setup."""generator = SlurmScriptGenerator(basic_params)shebang = generator._generate_shebang()assert shebang.startswith("#!/bin/bash")assert "#SBATCH --job-name=test-model" in shebangassert "#SBATCH --partition=gpu" in ...
1
8
2
45
0
122
131
122
self,basic_params
[]
None
{"Assign": 2, "Expr": 1}
3
10
3
["SlurmScriptGenerator", "generator._generate_shebang", "shebang.startswith"]
0
[]
The function (test_generate_shebang_single_node) defined within the public class called TestSlurmScriptGenerator.The function start at line 122 and ends at 131. It contains 8 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [122.0] and does not return any value. It declares 3...
VectorInstitute_vector-inference
TestSlurmScriptGenerator
public
0
0
test_generate_shebang_multinode
def test_generate_shebang_multinode(self, multinode_params):"""Test shebang generation for multi-node setup."""generator = SlurmScriptGenerator(multinode_params)shebang = generator._generate_shebang()assert "#SBATCH --nodes=2" in shebangassert "#SBATCH --exclusive" in shebangassert "#SBATCH --tasks-per-node=1" in sheba...
1
6
2
33
0
133
140
133
self,multinode_params
[]
None
{"Assign": 2, "Expr": 1}
2
8
2
["SlurmScriptGenerator", "generator._generate_shebang"]
0
[]
The function (test_generate_shebang_multinode) defined within the public class called TestSlurmScriptGenerator.The function start at line 133 and ends at 140. It contains 6 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [133.0] and does not return any value. It declares 2.0...
VectorInstitute_vector-inference
TestSlurmScriptGenerator
public
0
0
test_generate_server_setup_single_node
def test_generate_server_setup_single_node(self, basic_params):"""Test server setup generation for single-node."""generator = SlurmScriptGenerator(basic_params)setup = generator._generate_server_setup()assert "head_node_ip=${SLURMD_NODENAME}" in setupassert "source /path/to/src/find_port.sh" in setupassert "ray start -...
1
6
2
34
0
142
149
142
self,basic_params
[]
None
{"Assign": 2, "Expr": 1}
2
8
2
["SlurmScriptGenerator", "generator._generate_server_setup"]
0
[]
The function (test_generate_server_setup_single_node) defined within the public class called TestSlurmScriptGenerator.The function start at line 142 and ends at 149. It contains 6 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [142.0] and does not return any value. It decla...
VectorInstitute_vector-inference
TestSlurmScriptGenerator
public
0
0
test_generate_server_setup_multinode
def test_generate_server_setup_multinode(self, multinode_params):"""Test server setup generation for multi-node."""generator = SlurmScriptGenerator(multinode_params)setup = generator._generate_server_setup()assert "ray start --head" in setupassert "ray start --address" in setupassert "scontrol show hostnames" in setupa...
1
7
2
37
0
151
159
151
self,multinode_params
[]
None
{"Assign": 2, "Expr": 1}
2
9
2
["SlurmScriptGenerator", "generator._generate_server_setup"]
0
[]
The function (test_generate_server_setup_multinode) defined within the public class called TestSlurmScriptGenerator.The function start at line 151 and ends at 159. It contains 7 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [151.0] and does not return any value. It declare...
VectorInstitute_vector-inference
TestSlurmScriptGenerator
public
0
0
test_generate_server_setup_singularity
def test_generate_server_setup_singularity(self, singularity_params):"""Test server setup with Singularity container."""generator = SlurmScriptGenerator(singularity_params)setup = generator._generate_server_setup()assert "ray stop" in setupassert ("module load " in setup)# Remove module name since it's inconsistent bet...
1
7
2
31
0
161
169
161
self,singularity_params
[]
None
{"Assign": 2, "Expr": 1}
2
9
2
["SlurmScriptGenerator", "generator._generate_server_setup"]
0
[]
The function (test_generate_server_setup_singularity) defined within the public class called TestSlurmScriptGenerator.The function start at line 161 and ends at 169. It contains 7 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [161.0] and does not return any value. It decla...
VectorInstitute_vector-inference
TestSlurmScriptGenerator
public
0
0
test_generate_launch_cmd_venv
def test_generate_launch_cmd_venv(self, basic_params):"""Test launch command generation with virtual environment."""generator = SlurmScriptGenerator(basic_params)launch_cmd = generator._generate_launch_cmd()assert "source /path/to/venv/bin/activate" in launch_cmdassert "vllm serve /path/to/model_weights/test-model" in ...
1
9
2
45
0
171
181
171
self,basic_params
[]
None
{"Assign": 2, "Expr": 1}
2
11
2
["SlurmScriptGenerator", "generator._generate_launch_cmd"]
0
[]
The function (test_generate_launch_cmd_venv) defined within the public class called TestSlurmScriptGenerator.The function start at line 171 and ends at 181. It contains 9 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [171.0] and does not return any value. It declares 2.0 f...
VectorInstitute_vector-inference
TestSlurmScriptGenerator
public
0
0
test_generate_launch_cmd_singularity
def test_generate_launch_cmd_singularity(self, singularity_params):"""Test launch command generation with Singularity."""generator = SlurmScriptGenerator(singularity_params)launch_cmd = generator._generate_launch_cmd()assert "exec --nv" in launch_cmdassert "--bind /path/to/model_weights/test-model" in launch_cmdassert ...
1
7
2
38
0
183
191
183
self,singularity_params
[]
None
{"Assign": 2, "Expr": 1}
2
9
2
["SlurmScriptGenerator", "generator._generate_launch_cmd"]
0
[]
The function (test_generate_launch_cmd_singularity) defined within the public class called TestSlurmScriptGenerator.The function start at line 183 and ends at 191. It contains 7 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [183.0] and does not return any value. It declare...
VectorInstitute_vector-inference
TestSlurmScriptGenerator
public
0
0
test_generate_launch_cmd_boolean_args
def test_generate_launch_cmd_boolean_args(self, basic_params):"""Test launch command with boolean vLLM arguments."""params = basic_params.copy()params["vllm_args"] = {"--trust-remote-code": True,"--disable-log-stats": True,"--tensor-parallel-size": "2",}generator = SlurmScriptGenerator(params)launch_cmd = generator._ge...
1
12
2
59
0
193
207
193
self,basic_params
[]
None
{"Assign": 4, "Expr": 1}
3
15
3
["basic_params.copy", "SlurmScriptGenerator", "generator._generate_launch_cmd"]
0
[]
The function (test_generate_launch_cmd_boolean_args) defined within the public class called TestSlurmScriptGenerator.The function start at line 193 and ends at 207. It contains 12 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [193.0] and does not return any value. It decla...
VectorInstitute_vector-inference
TestSlurmScriptGenerator
public
0
0
test_write_to_log_dir
def test_write_to_log_dir(self, mock_datetime, mock_file, basic_params, temp_log_dir):"""Test writing SLURM script to log directory."""mock_datetime.now.return_value.strftime.return_value = "20240101_120000"params = basic_params.copy()params["log_dir"] = str(temp_log_dir)generator = SlurmScriptGenerator(params)with pat...
1
14
5
82
0
211
229
211
self,mock_datetime,mock_file,basic_params,temp_log_dir
[]
None
{"Assign": 6, "Expr": 2, "With": 1}
8
19
8
["basic_params.copy", "str", "SlurmScriptGenerator", "patch.object", "generator.write_to_log_dir", "mock_write.assert_called_once", "patch", "patch"]
0
[]
The function (test_write_to_log_dir) defined within the public class called TestSlurmScriptGenerator.The function start at line 211 and ends at 229. It contains 14 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [211.0] and does not return any value. It declares 8.0 function...
VectorInstitute_vector-inference
TestSlurmScriptGenerator
public
0
0
test_generate_script_content_integration
def test_generate_script_content_integration(self, basic_params):"""Test complete script generation integration."""generator = SlurmScriptGenerator(basic_params)content = generator._generate_script_content()assert content.startswith("#!/bin/bash")assert "vllm serve" in contentassert "find_available_port" in contentasse...
1
7
2
40
0
231
239
231
self,basic_params
[]
None
{"Assign": 2, "Expr": 1}
3
9
3
["SlurmScriptGenerator", "generator._generate_script_content", "content.startswith"]
0
[]
The function (test_generate_script_content_integration) defined within the public class called TestSlurmScriptGenerator.The function start at line 231 and ends at 239. It contains 7 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [231.0] and does not return any value. It dec...
VectorInstitute_vector-inference
TestSlurmScriptGenerator
public
0
0
temp_log_dir
def temp_log_dir(self):"""Generate temporary directory for log files."""with tempfile.TemporaryDirectory() as tmpdir:yield Path(tmpdir)
1
3
1
20
0
246
249
68
self
[]
None
{"Expr": 2, "With": 1}
2
4
2
["tempfile.TemporaryDirectory", "Path"]
0
[]
The function (temp_log_dir) defined within the public class called TestSlurmScriptGenerator.The function start at line 246 and ends at 249. 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...
VectorInstitute_vector-inference
TestBatchSlurmScriptGenerator
public
0
0
batch_params
def batch_params(self):"""Generate batch SLURM configuration parameters."""return {"models": {"model1": {"model_name": "model1","model_weights_parent_dir": "/path/to/model_weights","src_dir": "/path/to/src","log_dir": "/path/to/logs","num_nodes": "1","venv": "/path/to/venv","gpus_per_node": "4","partition": "gpu","acco...
1
51
1
186
0
252
303
252
self
[]
Returns
{"Expr": 1, "Return": 1}
0
52
0
[]
0
[]
The function (batch_params) defined within the public class called TestBatchSlurmScriptGenerator.The function start at line 252 and ends at 303. It contains 51 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value..
VectorInstitute_vector-inference
TestBatchSlurmScriptGenerator
public
0
0
batch_singularity_params
def batch_singularity_params(self, batch_params):"""Generate batch SLURM configuration parameters with Singularity."""singularity_params = batch_params.copy()singularity_params["venv"] = "singularity"# Set top-level venv to singularityfor model_name in singularity_params["models"]:singularity_params["models"][model_nam...
2
9
2
57
0
306
315
306
self,batch_params
[]
Returns
{"Assign": 4, "Expr": 1, "For": 1, "Return": 1}
1
10
1
["batch_params.copy"]
0
[]
The function (batch_singularity_params) defined within the public class called TestBatchSlurmScriptGenerator.The function start at line 306 and ends at 315. It contains 9 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [306.0], and this function return a value. It declare 1....
VectorInstitute_vector-inference
TestBatchSlurmScriptGenerator
public
0
0
test_init_basic
def test_init_basic(self, batch_params):"""Test initialization with basic configuration."""generator = BatchSlurmScriptGenerator(batch_params)assert generator.params == batch_paramsassert not generator.use_containerassert len(generator.script_paths) == 0assert "model1" in generator.params["models"]assert "model2" in ge...
1
7
2
52
0
317
325
317
self,batch_params
[]
None
{"Assign": 1, "Expr": 1}
2
9
2
["BatchSlurmScriptGenerator", "len"]
0
[]
The function (test_init_basic) defined within the public class called TestBatchSlurmScriptGenerator.The function start at line 317 and ends at 325. It contains 7 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [317.0] and does not return any value. It declares 2.0 functions,...
VectorInstitute_vector-inference
TestSlurmScriptGenerator
public
0
0
test_init_singularity
def test_init_singularity(self, batch_singularity_params):"""Test initialization with Singularity configuration."""generator = BatchSlurmScriptGenerator(batch_singularity_params)assert generator.use_containerassert (generator.params["models"]["model1"]["additional_binds"]== " --bind /scratch:/scratch,/data:/data")asser...
1
11
2
52
0
327
339
327
self,singularity_params
[]
None
{"Assign": 1, "Expr": 1}
1
13
1
["SlurmScriptGenerator"]
0
[]
The function (test_init_singularity) defined within the public class called TestSlurmScriptGenerator.The function start at line 327 and ends at 339. It contains 11 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [327.0] and does not return any value. It declare 1.0 function,...
VectorInstitute_vector-inference
TestSlurmScriptGenerator
public
0
0
test_init_singularity_no_bind
def test_init_singularity_no_bind(self, batch_params):"""Test Singularity initialization without additional binds."""params = batch_params.copy()params["venv"] = "singularity"# Set top-level venv to singularityfor model_name in params["models"]:params["models"][model_name]["venv"] = "singularity"generator = BatchSlurmS...
2
9
2
81
0
341
352
341
self,basic_params
[]
None
{"Assign": 3, "Expr": 1}
2
12
2
["basic_params.copy", "SlurmScriptGenerator"]
0
[]
The function (test_init_singularity_no_bind) defined within the public class called TestSlurmScriptGenerator.The function start at line 341 and ends at 352. It contains 9 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [341.0] and does not return any value. It declares 2.0 f...
VectorInstitute_vector-inference
TestBatchSlurmScriptGenerator
public
0
0
test_generate_batch_slurm_script_shebang
def test_generate_batch_slurm_script_shebang(self, batch_params):"""Test shebang generation for batch mode."""generator = BatchSlurmScriptGenerator(batch_params)shebang = generator._generate_batch_slurm_script_shebang()assert "#SBATCH --output=/path/to/logs/BATCH-model1-model2.%j.out" in shebangassert "#SBATCH --error=...
1
8
2
41
0
354
363
354
self,batch_params
[]
None
{"Assign": 2, "Expr": 1}
2
10
2
["BatchSlurmScriptGenerator", "generator._generate_batch_slurm_script_shebang"]
0
[]
The function (test_generate_batch_slurm_script_shebang) defined within the public class called TestBatchSlurmScriptGenerator.The function start at line 354 and ends at 363. It contains 8 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [354.0] and does not return any value. I...
VectorInstitute_vector-inference
TestBatchSlurmScriptGenerator
public
0
0
test_generate_model_launch_script_basic
def test_generate_model_launch_script_basic(self, mock_write_text, mock_touch, batch_params):"""Test generation of individual model launch scripts."""generator = BatchSlurmScriptGenerator(batch_params)script_path = generator._generate_model_launch_script("model1")assert script_path.name == "launch_model1.sh"assert len(...
1
10
4
60
0
367
378
367
self,mock_write_text,mock_touch,batch_params
[]
None
{"Assign": 2, "Expr": 3}
7
12
7
["BatchSlurmScriptGenerator", "generator._generate_model_launch_script", "len", "mock_touch.assert_called_once", "mock_write_text.assert_called_once", "patch", "patch"]
0
[]
The function (test_generate_model_launch_script_basic) defined within the public class called TestBatchSlurmScriptGenerator.The function start at line 367 and ends at 378. It contains 10 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [367.0] and does not return any value. I...
VectorInstitute_vector-inference
TestBatchSlurmScriptGenerator
public
0
0
test_generate_model_launch_script_singularity
def test_generate_model_launch_script_singularity(self, mock_write_text, mock_touch, batch_singularity_params):"""Test generation of individual model launch scripts with Singularity."""generator = BatchSlurmScriptGenerator(batch_singularity_params)script_path = generator._generate_model_launch_script("model1")assert sc...
1
9
4
51
0
382
392
382
self,mock_write_text,mock_touch,batch_singularity_params
[]
None
{"Assign": 2, "Expr": 3}
7
11
7
["BatchSlurmScriptGenerator", "generator._generate_model_launch_script", "len", "mock_touch.assert_called_once", "mock_write_text.assert_called_once", "patch", "patch"]
0
[]
The function (test_generate_model_launch_script_singularity) defined within the public class called TestBatchSlurmScriptGenerator.The function start at line 382 and ends at 392. It contains 9 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [382.0] and does not return any val...
VectorInstitute_vector-inference
TestBatchSlurmScriptGenerator
public
0
0
test_generate_batch_slurm_script
def test_generate_batch_slurm_script(self, mock_write_text, mock_touch, mock_datetime, batch_params, temp_log_dir):"""Test complete batch SLURM script generation."""mock_datetime.now.return_value.strftime.return_value = "20240101_120000"params = batch_params.copy()params["log_dir"] = str(temp_log_dir)generator = BatchS...
3
17
6
118
0
397
418
397
self,mock_write_text,mock_touch,mock_datetime,batch_params,temp_log_dir
[]
None
{"Assign": 6, "Expr": 3}
14
22
14
["batch_params.copy", "str", "BatchSlurmScriptGenerator", "generator.generate_batch_slurm_script", "len", "any", "str", "any", "str", "mock_touch.assert_called", "mock_write_text.assert_called", "patch", "patch", "patch"]
0
[]
The function (test_generate_batch_slurm_script) defined within the public class called TestBatchSlurmScriptGenerator.The function start at line 397 and ends at 418. It contains 17 lines of code and it has a cyclomatic complexity of 3. It takes 6 parameters, represented as [397.0] and does not return any value. It decla...
VectorInstitute_vector-inference
TestBatchSlurmScriptGenerator
public
0
0
test_generate_batch_slurm_script_singularity
def test_generate_batch_slurm_script_singularity(self,mock_write_text,mock_touch,mock_datetime,batch_singularity_params,temp_log_dir,):"""Test complete batch SLURM script generation with Singularity."""mock_datetime.now.return_value.strftime.return_value = "20240101_120000"params = batch_singularity_params.copy()params...
1
20
6
87
0
423
447
423
self,mock_write_text,mock_touch,mock_datetime,batch_singularity_params,temp_log_dir
[]
None
{"Assign": 6, "Expr": 3}
10
25
10
["batch_singularity_params.copy", "str", "BatchSlurmScriptGenerator", "generator.generate_batch_slurm_script", "len", "mock_touch.assert_called", "mock_write_text.assert_called", "patch", "patch", "patch"]
0
[]
The function (test_generate_batch_slurm_script_singularity) defined within the public class called TestBatchSlurmScriptGenerator.The function start at line 423 and ends at 447. It contains 20 lines of code and it has a cyclomatic complexity of 1. It takes 6 parameters, represented as [423.0] and does not return any val...
VectorInstitute_vector-inference
TestSlurmScriptGenerator
public
0
0
test_write_to_log_dir
def test_write_to_log_dir(self, mock_write_text, mock_touch, batch_params, temp_log_dir):"""Test writing script to log directory."""params = batch_params.copy()params["log_dir"] = str(temp_log_dir)generator = BatchSlurmScriptGenerator(params)script_path = generator._write_to_log_dir(["#!/bin/bash", "echo 'test'"], "tes...
1
13
5
70
0
451
467
451
self,mock_datetime,mock_file,basic_params,temp_log_dir
[]
None
{"Assign": 6, "Expr": 2, "With": 1}
8
19
8
["basic_params.copy", "str", "SlurmScriptGenerator", "patch.object", "generator.write_to_log_dir", "mock_write.assert_called_once", "patch", "patch"]
0
[]
The function (test_write_to_log_dir) defined within the public class called TestSlurmScriptGenerator.The function start at line 451 and ends at 467. It contains 13 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [451.0] and does not return any value. It declares 8.0 function...
VectorInstitute_vector-inference
TestBatchSlurmScriptGenerator
public
0
0
test_model_weights_path_construction
def test_model_weights_path_construction(self, batch_params):"""Test model weights path construction."""generator = BatchSlurmScriptGenerator(batch_params)assert (generator.params["models"]["model1"]["model_weights_path"]== "/path/to/model_weights/model1")assert (generator.params["models"]["model2"]["model_weights_path...
1
10
2
48
0
469
480
469
self,batch_params
[]
None
{"Assign": 1, "Expr": 1}
1
12
1
["BatchSlurmScriptGenerator"]
0
[]
The function (test_model_weights_path_construction) defined within the public class called TestBatchSlurmScriptGenerator.The function start at line 469 and ends at 480. It contains 10 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [469.0] and does not return any value. It d...
VectorInstitute_vector-inference
TestBatchSlurmScriptGenerator
public
0
0
test_multiple_models_script_generation
def test_multiple_models_script_generation(self, mock_write_text, mock_touch, batch_params):"""Test generation of scripts for multiple models."""generator = BatchSlurmScriptGenerator(batch_params)# Generate scripts for both modelsscript1_path = generator._generate_model_launch_script("model1")script2_path = generator._...
1
11
4
67
0
484
498
484
self,mock_write_text,mock_touch,batch_params
[]
None
{"Assign": 3, "Expr": 1}
6
15
6
["BatchSlurmScriptGenerator", "generator._generate_model_launch_script", "generator._generate_model_launch_script", "len", "patch", "patch"]
0
[]
The function (test_multiple_models_script_generation) defined within the public class called TestBatchSlurmScriptGenerator.The function start at line 484 and ends at 498. It contains 11 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [484.0] and does not return any value. It...
VectorInstitute_vector-inference
public
public
0
0
mock_log_dir
def mock_log_dir(tmp_path):"""Create a temporary directory for log files."""log_dir = tmp_path / "logs"log_dir.mkdir()return log_dir
1
4
1
18
1
22
26
22
tmp_path
['log_dir']
Returns
{"Assign": 1, "Expr": 2, "Return": 1}
1
5
1
["log_dir.mkdir"]
0
[]
The function (mock_log_dir) defined within the public class called public.The function start at line 22 and ends at 26. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declare 1.0 function, and It has 1.0 function call...
VectorInstitute_vector-inference
public
public
0
0
test_run_bash_command_success
def test_run_bash_command_success():"""Test that run_bash_command returns the output of the command."""with patch("subprocess.Popen") as mock_popen:mock_process = MagicMock()mock_process.communicate.return_value = ("test output", "")mock_popen.return_value = mock_processresult, stderr = run_bash_command("echo test")ass...
1
8
0
50
1
29
37
29
['mock_process']
None
{"Assign": 4, "Expr": 1, "With": 1}
3
9
3
["patch", "MagicMock", "run_bash_command"]
0
[]
The function (test_run_bash_command_success) defined within the public class called public.The function start at line 29 and ends at 37. It contains 8 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 3.0 functions, and It has 3....
VectorInstitute_vector-inference
public
public
0
0
test_run_bash_command_error
def test_run_bash_command_error():"""Test run_bash_command with error output."""with patch("subprocess.Popen") as mock_popen:mock_process = MagicMock()mock_process.communicate.return_value = ("", "error output")mock_popen.return_value = mock_processresult, stderr = run_bash_command("invalid_command")assert result == ""...
1
8
0
50
1
40
48
40
['mock_process']
None
{"Assign": 4, "Expr": 1, "With": 1}
3
9
3
["patch", "MagicMock", "run_bash_command"]
0
[]
The function (test_run_bash_command_error) defined within the public class called public.The function start at line 40 and ends at 48. It contains 8 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 3.0 functions, and It has 3.0 ...
VectorInstitute_vector-inference
public
public
0
0
test_read_slurm_log_found
def test_read_slurm_log_found(mock_log_dir):"""Test that read_slurm_log reads the content of a log file."""test_content = ["line1\n", "line2\n"]log_file = mock_log_dir / "test_job.123.err"log_file.parent.mkdir(parents=True, exist_ok=True)log_file.write_text("".join(test_content))result = read_slurm_log("test_job", "123...
1
7
1
59
3
51
58
51
mock_log_dir
['result', 'log_file', 'test_content']
None
{"Assign": 3, "Expr": 3}
4
8
4
["log_file.parent.mkdir", "log_file.write_text", "join", "read_slurm_log"]
0
[]
The function (test_read_slurm_log_found) defined within the public class called public.The function start at line 51 and ends at 58. It contains 7 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, and It has 4.0 fu...
VectorInstitute_vector-inference
public
public
0
0
test_read_slurm_log_not_found
def test_read_slurm_log_not_found():"""Test read_slurm_log, return an error message if the log file is not found."""result = read_slurm_log("missing_job", "456", "err", "/nonexistent")assert result == "LOG FILE NOT FOUND: /nonexistent/missing_job.456.err"
1
3
0
21
1
61
64
61
['result']
None
{"Assign": 1, "Expr": 1}
1
4
1
["read_slurm_log"]
0
[]
The function (test_read_slurm_log_not_found) defined within the public class called public.The function start at line 61 and ends at 64. 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 declare 1.0 function, and It has 1.0 ...
VectorInstitute_vector-inference
public
public
0
0
test_is_server_running_statuses
def test_is_server_running_statuses(log_content, expected):"""Test that is_server_running returns the correct status."""with patch("vec_inf.client._utils.read_slurm_log") as mock_read:mock_read.return_value = log_contentresult = is_server_running("test_job", "123", None)assert result == expected
1
5
2
35
1
76
81
76
log_content,expected
['result']
None
{"Assign": 2, "Expr": 1, "With": 1}
3
6
3
["patch", "is_server_running", "pytest.mark.parametrize"]
0
[]
The function (test_is_server_running_statuses) defined within the public class called public.The function start at line 76 and ends at 81. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [76.0] and does not return any value. It declares 3.0 functions, and It h...
VectorInstitute_vector-inference
public
public
0
0
test_get_base_url_found
def test_get_base_url_found():"""Test that get_base_url returns the correct base URL."""test_dict = {"server_address": "http://localhost:8000"}with patch("vec_inf.client._utils.read_slurm_log") as mock_read:mock_read.return_value = test_dictresult = get_base_url("test_job", "123", None)assert result == "http://localhos...
1
6
0
39
2
84
90
84
['result', 'test_dict']
None
{"Assign": 3, "Expr": 1, "With": 1}
2
7
2
["patch", "get_base_url"]
0
[]
The function (test_get_base_url_found) defined within the public class called public.The function start at line 84 and ends at 90. 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 2.0 functions, and It has 2.0 func...
VectorInstitute_vector-inference
public
public
0
0
test_get_base_url_not_found
def test_get_base_url_not_found():"""Test get_base_url when URL is not found in logs."""with patch("vec_inf.client._utils.read_slurm_log") as mock_read:mock_read.return_value = {"random_key": "123"}result = get_base_url("test_job", "123", None)assert result == "URL NOT FOUND"
1
5
0
36
1
93
98
93
['result']
None
{"Assign": 2, "Expr": 1, "With": 1}
2
6
2
["patch", "get_base_url"]
0
[]
The function (test_get_base_url_not_found) defined within the public class called public.The function start at line 93 and ends at 98. 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.0 ...
VectorInstitute_vector-inference
public
public
0
0
test_model_health_check
def test_model_health_check(url, status_code, expected):"""Test model_health_check with various scenarios."""with patch("vec_inf.client._utils.get_base_url") as mock_url:mock_url.return_value = urlif url.startswith("http"):with patch("requests.get") as mock_get:mock_get.return_value.status_code = status_coderesult = mo...
2
11
3
76
1
109
120
109
url,status_code,expected
['result']
None
{"Assign": 4, "Expr": 1, "If": 1, "With": 2}
6
12
6
["patch", "url.startswith", "patch", "model_health_check", "model_health_check", "pytest.mark.parametrize"]
0
[]
The function (test_model_health_check) defined within the public class called public.The function start at line 109 and ends at 120. It contains 11 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [109.0] and does not return any value. It declares 6.0 functions, and It has 6...
VectorInstitute_vector-inference
public
public
0
0
test_model_health_check_request_exception
def test_model_health_check_request_exception():"""Test model_health_check when request raises an exception."""with (patch("vec_inf.client._utils.get_base_url") as mock_url,patch("requests.get") as mock_get,):mock_url.return_value = "http://localhost:8000"mock_get.side_effect = requests.exceptions.RequestException("Con...
1
9
0
58
1
123
132
123
['result']
None
{"Assign": 3, "Expr": 1, "With": 1}
4
10
4
["patch", "patch", "requests.exceptions.RequestException", "model_health_check"]
0
[]
The function (test_model_health_check_request_exception) defined within the public class called public.The function start at line 123 and ends at 132. 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 4.0 functions, ...
VectorInstitute_vector-inference
public
public
0
0
test_load_config_default_only
def test_load_config_default_only():"""Test loading the actual default configuration file from the filesystem."""configs = load_config()# Verify at least one known model existsmodel_names = {m.model_name for m in configs}assert "c4ai-command-r-plus-08-2024" in model_names# Verify full configuration of a sample modelmod...
4
10
0
74
3
135
149
135
['configs', 'model', 'model_names']
None
{"Assign": 3, "Expr": 1}
2
15
2
["load_config", "next"]
0
[]
The function (test_load_config_default_only) defined within the public class called public.The function start at line 135 and ends at 149. 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 2.0 functions, and It has...
VectorInstitute_vector-inference
public
public
0
0
test_load_config_with_user_override
def test_load_config_with_user_override(tmp_path, monkeypatch):"""Test user config overriding default values."""# Create user config directory and fileuser_config_dir = tmp_path / "user_config_dir"user_config_dir.mkdir()user_config_file = user_config_dir / "models.yaml"user_config_file.write_text("""\models:c4ai-comman...
2
30
2
133
5
152
188
152
tmp_path,monkeypatch
['configs', 'user_config_dir', 'new_model', 'config_map', 'user_config_file']
None
{"Assign": 5, "Expr": 4, "With": 1}
6
37
6
["user_config_dir.mkdir", "user_config_file.write_text", "monkeypatch.context", "m.setenv", "str", "load_config"]
0
[]
The function (test_load_config_with_user_override) defined within the public class called public.The function start at line 152 and ends at 188. It contains 30 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [152.0] and does not return any value. It declares 6.0 functions, a...
VectorInstitute_vector-inference
public
public
0
0
test_load_config_invalid_user_model
def test_load_config_invalid_user_model(tmp_path):"""Test validation of user-provided model configurations."""# Create user config directory and fileinvalid_config_dir = tmp_path / "bad_config_dir"invalid_config_dir.mkdir()invalid_config_file = invalid_config_dir / "models.yaml"invalid_config_file.write_text("""\models...
1
20
1
92
2
191
214
191
tmp_path
['invalid_config_dir', 'invalid_config_file']
None
{"Assign": 2, "Expr": 4, "With": 1}
10
24
10
["invalid_config_dir.mkdir", "invalid_config_file.write_text", "pytest.raises", "patch.dict", "str", "load_config", "lower", "str", "str", "str"]
0
[]
The function (test_load_config_invalid_user_model) defined within the public class called public.The function start at line 191 and ends at 214. It contains 20 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 10.0 functions, and ...
VectorInstitute_vector-inference
public
public
0
0
test_find_matching_dirs_only_model_family
def test_find_matching_dirs_only_model_family(tmp_path):"""Return model_family directory when only model_family is provided."""fam_dir = tmp_path / "fam_a"fam_dir.mkdir()(fam_dir / "model_a.1").mkdir()(fam_dir / "model_b.2").mkdir()other_dir = tmp_path / "fam_b"other_dir.mkdir()(other_dir / "model_c.3").mkdir()matches ...
1
11
1
81
3
217
230
217
tmp_path
['matches', 'other_dir', 'fam_dir']
None
{"Assign": 3, "Expr": 6}
7
14
7
["fam_dir.mkdir", "mkdir", "mkdir", "other_dir.mkdir", "mkdir", "find_matching_dirs", "len"]
0
[]
The function (test_find_matching_dirs_only_model_family) defined within the public class called public.The function start at line 217 and ends at 230. It contains 11 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,...
VectorInstitute_vector-inference
public
public
0
0
test_find_matching_dirs_only_model_name
def test_find_matching_dirs_only_model_name(tmp_path):"""Return directories matching when only model_name is provided."""fam_a = tmp_path / "fam_a"fam_a.mkdir()(fam_a / "target.1").mkdir()(fam_a / "other.2").mkdir()fam_b = tmp_path / "fam_b"fam_b.mkdir()(fam_b / "different.3").mkdir()matches = find_matching_dirs(log_di...
2
13
1
90
4
233
249
233
tmp_path
['matches', 'fam_b', 'result_names', 'fam_a']
None
{"Assign": 4, "Expr": 6}
6
17
6
["fam_a.mkdir", "mkdir", "mkdir", "fam_b.mkdir", "mkdir", "find_matching_dirs"]
0
[]
The function (test_find_matching_dirs_only_model_name) defined within the public class called public.The function start at line 233 and ends at 249. It contains 13 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 6.0 functions, a...
VectorInstitute_vector-inference
public
public
0
0
test_find_matching_dirs_only_job_id
def test_find_matching_dirs_only_job_id(tmp_path):"""Return directories matching exact job_id."""fam_dir = tmp_path / "fam"fam_dir.mkdir()(fam_dir / "model_a.10").mkdir()(fam_dir / "model_b.20").mkdir()(fam_dir / "model_c.30").mkdir()matches = find_matching_dirs(log_dir=tmp_path, job_id=10)result_names = [p.name for p ...
2
11
1
80
3
252
265
252
tmp_path
['matches', 'fam_dir', 'result_names']
None
{"Assign": 3, "Expr": 5}
5
14
5
["fam_dir.mkdir", "mkdir", "mkdir", "mkdir", "find_matching_dirs"]
0
[]
The function (test_find_matching_dirs_only_job_id) defined within the public class called public.The function start at line 252 and ends at 265. It contains 11 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 ...
VectorInstitute_vector-inference
public
public
0
0
test_find_matching_dirs_only_before_job_id
def test_find_matching_dirs_only_before_job_id(tmp_path):"""Return directories with job_id < before_job_id."""fam_dir = tmp_path / "fam_a"fam_dir.mkdir()(fam_dir / "model_a.1").mkdir()(fam_dir / "model_a.5").mkdir()(fam_dir / "model_a.100").mkdir()fam_dir = tmp_path / "fam_b"fam_dir.mkdir()(fam_dir / "model_b.30").mkdi...
2
15
1
102
3
268
286
268
tmp_path
['matches', 'fam_dir', 'result_names']
None
{"Assign": 4, "Expr": 7}
7
19
7
["fam_dir.mkdir", "mkdir", "mkdir", "mkdir", "fam_dir.mkdir", "mkdir", "find_matching_dirs"]
0
[]
The function (test_find_matching_dirs_only_before_job_id) defined within the public class called public.The function start at line 268 and ends at 286. It contains 15 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 7.0 functions...
VectorInstitute_vector-inference
public
public
0
0
test_find_matching_dirs_family_and_before_job_id
def test_find_matching_dirs_family_and_before_job_id(tmp_path):"""Return directories under a given family with job IDs less than before_job_id."""fam_dir = tmp_path / "targetfam"fam_dir.mkdir()(fam_dir / "model_a.10").mkdir()(fam_dir / "model_a.20").mkdir()(fam_dir / "model_a.99").mkdir()(fam_dir / "model_a.150").mkdir...
3
23
1
149
4
289
316
289
tmp_path
['matches', 'fam_dir', 'result_names', 'other_fam']
None
{"Assign": 4, "Expr": 10}
12
28
12
["fam_dir.mkdir", "mkdir", "mkdir", "mkdir", "mkdir", "other_fam.mkdir", "mkdir", "mkdir", "mkdir", "find_matching_dirs", "all", "str"]
0
[]
The function (test_find_matching_dirs_family_and_before_job_id) defined within the public class called public.The function start at line 289 and ends at 316. It contains 23 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 12.0 fu...
VectorInstitute_vector-inference
public
public
0
0
test_find_matching_dirs_with_family_model_name_and_before_job_id
def test_find_matching_dirs_with_family_model_name_and_before_job_id(tmp_path):"""Return matching dirs with model_family, model_name, and before_job_id filters."""fam_dir = tmp_path / "targetfam"fam_dir.mkdir()(fam_dir / "model_a.1").mkdir()(fam_dir / "model_a.50").mkdir()(fam_dir / "model_a.150").mkdir()(fam_dir / "mo...
4
23
1
148
4
319
346
319
tmp_path
['matches', 'fam_dir', 'result_names', 'other_fam']
None
{"Assign": 4, "Expr": 8}
11
28
11
["fam_dir.mkdir", "mkdir", "mkdir", "mkdir", "mkdir", "other_fam.mkdir", "mkdir", "find_matching_dirs", "all", "all", "str"]
0
[]
The function (test_find_matching_dirs_with_family_model_name_and_before_job_id) defined within the public class called public.The function start at line 319 and ends at 346. It contains 23 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 ...
VectorInstitute_vector-inference
public
public
0
0
cli
def cli() -> None:"""Vector Inference CLI."""pass
1
2
0
8
0
43
45
43
[]
None
{"Expr": 1}
1
3
1
["click.group"]
7
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3950225_cfn_sphere_cfn_sphere.src.main.python.cfn_sphere.cli_py.main", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3963857_anime_dl_anime_downloader.anime_downloader.cli_py.main", "_.content.gdrive.MyDrive.Phd_The...
The function (cli) defined within the public class called public.The function start at line 43 and ends at 45. 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, It has 1.0 function called inside which is...
VectorInstitute_vector-inference
public
public
0
0
launch
def launch(model_name: str,**cli_kwargs: Optional[Union[str, int, float, bool]],) -> None:"""Launch a model on the cluster.Parameters----------model_name : strName of the model to launch**cli_kwargs : dictAdditional launch options including:- model_family : str, optionalFamily/architecture of the model- model_variant :...
4
22
2
128
6
144
226
144
model_name,**cli_kwargs
['launch_response', 'client', 'json_mode', 'launch_info_table', 'launch_options', 'launch_formatter']
None
{"Assign": 6, "Expr": 3, "If": 1, "Try": 1}
32
83
32
["LaunchOptions", "VecInfClient", "client.launch_model", "click.echo", "json.dumps", "LaunchResponseFormatter", "launch_formatter.format_table_output", "CONSOLE.print", "click.ClickException", "str", "cli.command", "click.argument", "click.option", "click.option", "click.option", "click.option", "click.option", "click....
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 public.The function start at line 144 and ends at 226. It contains 22 lines of code and it has a cyclomatic complexity of 4. It takes 2 parameters, represented as [144.0] and does not return any value. It declares 32.0 functions, It has 32.0 functions called ...
VectorInstitute_vector-inference
public
public
0
0
batch_launch
def batch_launch(model_names: tuple[str, ...],batch_config: Optional[str] = None,account: Optional[str] = None,work_dir: Optional[str] = None,json_mode: Optional[bool] = False,) -> None:"""Launch multiple models in a batch.Parameters----------model_names : tuple[str, ...]Names of the models to launchbatch_config : strM...
4
24
5
143
4
256
299
256
model_names,batch_config,account,work_dir,json_mode
['batch_launch_response', 'client', 'batch_launch_info_table', 'batch_launch_formatter']
None
{"Assign": 4, "Expr": 3, "If": 1, "Try": 1}
16
44
16
["VecInfClient", "client.batch_launch_models", "list", "click.echo", "json.dumps", "BatchLaunchResponseFormatter", "batch_launch_formatter.format_table_output", "CONSOLE.print", "click.ClickException", "str", "cli.command", "click.argument", "click.option", "click.option", "click.option", "click.option"]
0
[]
The function (batch_launch) defined within the public class called public.The function start at line 256 and ends at 299. It contains 24 lines of code and it has a cyclomatic complexity of 4. It takes 5 parameters, represented as [256.0] and does not return any value. It declares 16.0 functions, and It has 16.0 functi...
VectorInstitute_vector-inference
public
public
0
0
status
def status(slurm_job_id: str, json_mode: bool = False) -> None:"""Get the status of a running model on the cluster.Parameters----------slurm_job_id : strID of the SLURM job to checkjson_mode : bool, default=FalseWhether to output in JSON formatRaises------click.ClickExceptionIf status check fails"""try:# Start the clie...
4
14
2
84
4
309
339
309
slurm_job_id,json_mode
['status_response', 'client', 'status_formatter', 'status_info_table']
None
{"Assign": 4, "Expr": 3, "If": 1, "Try": 1}
11
31
11
["VecInfClient", "client.get_status", "StatusResponseFormatter", "status_formatter.output_json", "status_formatter.output_table", "CONSOLE.print", "click.ClickException", "str", "cli.command", "click.argument", "click.option"]
4
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3720434_tsuru_rpaas.rpaas.router_api_py.get_backend", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3919404_enkore_i3pystatus.i3pystatus.battery_py.BatteryChecker.battery_status", "_.content.gdrive.MyDrive.Phd_Thesi...
The function (status) defined within the public class called public.The function start at line 309 and ends at 339. It contains 14 lines of code and it has a cyclomatic complexity of 4. It takes 2 parameters, represented as [309.0] and does not return any value. It declares 11.0 functions, It has 11.0 functions called ...
VectorInstitute_vector-inference
public
public
0
0
shutdown
def shutdown(slurm_job_id: str) -> None:"""Shutdown a running model on the cluster.Parameters----------slurm_job_id : strID of the SLURM job to shut downRaises------click.ClickExceptionIf shutdown operation fails"""try:client = VecInfClient()client.shutdown_model(slurm_job_id)click.echo(f"Shutting down model with Slurm...
2
7
1
45
1
344
362
344
slurm_job_id
['client']
None
{"Assign": 1, "Expr": 3, "Try": 1}
7
19
7
["VecInfClient", "client.shutdown_model", "click.echo", "click.ClickException", "str", "cli.command", "click.argument"]
17
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3660028_openprocurement_openprocurement_auction.openprocurement.auction.helpers.chronograph_py.AuctionScheduler.shutdown", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3703461_scoutapp_scout_apm_python.tests.unit.t...
The function (shutdown) defined within the public class called public.The function start at line 344 and ends at 362. It contains 7 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 7.0 functions, It has 7.0 functions called insid...
VectorInstitute_vector-inference
public
public
0
0
list_models
def list_models(model_name: Optional[str] = None, json_mode: bool = False) -> None:"""List all available models, or get default setup of a specific model.Parameters----------model_name : str, optionalName of specific model to get information forjson_mode : bool, default=FalseWhether to output in JSON formatRaises------...
4
14
2
92
4
372
400
372
model_name,json_mode
['model_infos', 'client', 'model_config', 'list_display']
None
{"Assign": 4, "Expr": 3, "If": 1, "Try": 1}
11
29
11
["VecInfClient", "ListCmdDisplay", "client.get_model_config", "list_display.display_single_model_output", "client.list_models", "list_display.display_all_models_output", "click.ClickException", "str", "cli.command", "click.argument", "click.option"]
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 public.The function start at line 372 and ends at 400. It contains 14 lines of code and it has a cyclomatic complexity of 4. It takes 2 parameters, represented as [372.0] and does not return any value. It declares 11.0 functions, It has 11.0 functions ca...
VectorInstitute_vector-inference
public
public
0
0
metrics
def metrics(slurm_job_id: str) -> None:"""Stream real-time performance metrics from the model endpoint.Parameters----------slurm_job_id : strID of the SLURM job to monitorRaises------click.ClickExceptionIf metrics collection failsNotes-----This command continuously streams metrics with a 2-second refresh intervaluntil ...
6
23
1
156
3
407
454
407
slurm_job_id
['metrics_response', 'client', 'metrics_formatter']
None
{"Assign": 5, "Expr": 7, "If": 2, "Return": 1, "Try": 1, "While": 1, "With": 1}
18
48
18
["VecInfClient", "client.get_metrics", "MetricsResponseFormatter", "isinstance", "metrics_formatter.format_failed_metrics", "CONSOLE.print", "Live", "client.get_metrics", "MetricsResponseFormatter", "isinstance", "metrics_formatter.format_failed_metrics", "metrics_formatter.format_metrics", "live.update", "time.sleep",...
3
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.70598532_awslabs_gluonts.src.gluonts.ev.__init___py.evaluate", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94634754_pytorch_executorch.examples.qualcomm.oss_scripts.t5.t5_model_py.Seq2SeqLMExportableModulePipeline...
The function (metrics) defined within the public class called public.The function start at line 407 and ends at 454. It contains 23 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 18.0 functions, It has 18.0 functions called ins...
VectorInstitute_vector-inference
public
public
0
0
cleanup_logs_cli
def cleanup_logs_cli(log_dir: Optional[str],model_family: Optional[str],model_name: Optional[str],job_id: Optional[int],before_job_id: Optional[int],dry_run: bool,) -> None:"""Clean up log files based on optional filters.Parameters----------log_dir : str or Path, optionalRoot directory containing log files. Defaults to...
6
31
6
151
2
470
518
470
log_dir,model_family,model_name,job_id,before_job_id,dry_run
['client', 'matched']
None
{"Assign": 2, "Expr": 6, "For": 1, "If": 3, "Try": 1}
18
49
18
["VecInfClient", "client.cleanup_logs", "click.echo", "click.echo", "click.echo", "len", "click.echo", "click.echo", "len", "click.ClickException", "str", "cli.command", "click.option", "click.option", "click.option", "click.option", "click.option", "click.option"]
0
[]
The function (cleanup_logs_cli) defined within the public class called public.The function start at line 470 and ends at 518. It contains 31 lines of code and it has a cyclomatic complexity of 6. It takes 6 parameters, represented as [470.0] and does not return any value. It declares 18.0 functions, and It has 18.0 fu...
VectorInstitute_vector-inference
LaunchResponseFormatter
public
0
0
__init__
def __init__(self, model_name: str, params: dict[str, Any]):self.model_name = model_nameself.params = params
1
3
3
28
0
35
37
35
self,model_name,params
[]
None
{"Assign": 2}
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 LaunchResponseFormatter.The function start at line 35 and ends at 37. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [35.0] and does not return any value. It has 14667.0 functions calling this func...
VectorInstitute_vector-inference
LaunchResponseFormatter
public
0
0
format_table_output
def format_table_output(self) -> Table:"""Format output as rich Table.Returns-------TableRich table containing formatted launch information including:- Job configuration- Model details- Resource allocation- vLLM configuration"""table = create_table(key_title="Job Config", value_title="Value")# Add key information with ...
8
33
1
368
0
39
95
39
self
[]
Table
{"Assign": 1, "Expr": 21, "For": 2, "If": 5, "Return": 1}
32
57
32
["create_table", "table.add_row", "table.add_row", "table.add_row", "table.add_row", "self.params.get", "table.add_row", "self.params.get", "table.add_row", "self.params.get", "table.add_row", "self.params.get", "table.add_row", "self.params.get", "table.add_row", "table.add_row", "table.add_row", "table.add_row", "tab...
0
[]
The function (format_table_output) defined within the public class called LaunchResponseFormatter.The function start at line 39 and ends at 95. It contains 33 lines of code and it has a cyclomatic complexity of 8. The function does not take any parameters and does not return any value. It declares 32.0 functions, and ...
VectorInstitute_vector-inference
LaunchResponseFormatter
public
0
0
__init__
def __init__(self, params: dict[str, Any]):self.params = params
1
2
2
19
0
110
111
110
self,model_name,params
[]
None
{"Assign": 2}
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 LaunchResponseFormatter.The function start at line 110 and ends at 111. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [110.0] and does not return any value. It has 14667.0 functions calling this f...
VectorInstitute_vector-inference
LaunchResponseFormatter
public
0
0
format_table_output
def format_table_output(self) -> Table:"""Format output as rich Table.Returns-------TableRich table containing formatted batch launch information including:- Job configuration- Model details- Resource allocation- vLLM configuration"""table = create_table(key_title="Job Config", value_title="Value")# Add key information...
7
38
1
270
0
113
164
113
self
[]
Table
{"Assign": 1, "Expr": 21, "For": 2, "If": 5, "Return": 1}
32
57
32
["create_table", "table.add_row", "table.add_row", "table.add_row", "table.add_row", "self.params.get", "table.add_row", "self.params.get", "table.add_row", "self.params.get", "table.add_row", "self.params.get", "table.add_row", "self.params.get", "table.add_row", "table.add_row", "table.add_row", "table.add_row", "tab...
0
[]
The function (format_table_output) defined within the public class called LaunchResponseFormatter.The function start at line 113 and ends at 164. It contains 38 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 32.0 functions, and...
VectorInstitute_vector-inference
LaunchResponseFormatter
public
0
0
__init__
def __init__(self, status_info: StatusResponse):self.status_info = status_info
1
2
2
14
0
179
180
179
self,model_name,params
[]
None
{"Assign": 2}
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 LaunchResponseFormatter.The function start at line 179 and ends at 180. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [179.0] and does not return any value. It has 14667.0 functions calling this f...
VectorInstitute_vector-inference
StatusResponseFormatter
public
0
0
output_json
def output_json(self) -> None:"""Format and output JSON data.Outputs a JSON object containing:- model_name- model_status- base_url- pending_reason (if applicable)- failed_reason (if applicable)"""json_data = {"model_name": self.status_info.model_name,"model_status": self.status_info.server_status,"base_url": self.statu...
3
11
1
85
0
182
202
182
self
[]
None
{"Assign": 3, "Expr": 2, "If": 2}
2
21
2
["click.echo", "json.dumps"]
0
[]
The function (output_json) defined within the public class called StatusResponseFormatter.The function start at line 182 and ends at 202. It contains 11 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 has ...
VectorInstitute_vector-inference
StatusResponseFormatter
public
0
0
output_table
def output_table(self) -> Table:"""Create and display rich table.Returns-------TableRich table containing formatted status information including:- Model name- Status- Base URL- Error information (if applicable)"""table = create_table(key_title="Job Status", value_title="Value")table.add_row("Model Name", self.status_in...
3
10
1
100
0
204
226
204
self
[]
Table
{"Assign": 1, "Expr": 6, "If": 2, "Return": 1}
6
23
6
["create_table", "table.add_row", "table.add_row", "table.add_row", "table.add_row", "table.add_row"]
2
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3549150_freenas_cli.freenas.cli.output.__init___py.format_output", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3549150_freenas_cli.freenas.cli.output.__init___py.output_table"]
The function (output_table) defined within the public class called StatusResponseFormatter.The function start at line 204 and ends at 226. It contains 10 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, It has 6.0 ...
VectorInstitute_vector-inference
LaunchResponseFormatter
public
0
0
__init__
def __init__(self, metrics: Union[dict[str, float], str]):self.metrics = self._set_metrics(metrics)self.table = create_table("Metric", "Value")self.enabled_prefix_caching = self._check_prefix_caching()
1
4
2
48
0
241
244
241
self,model_name,params
[]
None
{"Assign": 2}
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 LaunchResponseFormatter.The function start at line 241 and ends at 244. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [241.0] and does not return any value. It has 14667.0 functions calling this f...
VectorInstitute_vector-inference
MetricsResponseFormatter
public
0
0
_set_metrics
def _set_metrics(self, metrics: Union[dict[str, float], str]) -> dict[str, float]:"""Set the metrics attribute.Parameters----------metrics : Union[dict[str, float], str]Raw metrics dataReturns-------dict[str, float]Processed metrics dictionary"""return metrics if isinstance(metrics, dict) else {}
2
2
2
39
0
246
259
246
self,metrics
[]
dict[str, float]
{"Expr": 1, "Return": 1}
1
14
1
["isinstance"]
0
[]
The function (_set_metrics) defined within the public class called MetricsResponseFormatter.The function start at line 246 and ends at 259. It contains 2 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [246.0] and does not return any value. It declare 1.0 function, and It h...
VectorInstitute_vector-inference
MetricsResponseFormatter
public
0
0
_check_prefix_caching
def _check_prefix_caching(self) -> bool:"""Check if prefix caching is enabled.Returns-------boolTrue if prefix caching metrics are present"""return self.metrics.get("gpu_prefix_cache_hit_rate") is not None
1
2
1
20
0
261
269
261
self
[]
bool
{"Expr": 1, "Return": 1}
1
9
1
["self.metrics.get"]
0
[]
The function (_check_prefix_caching) defined within the public class called MetricsResponseFormatter.The function start at line 261 and ends at 269. 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 ...
VectorInstitute_vector-inference
MetricsResponseFormatter
public
0
0
format_failed_metrics
def format_failed_metrics(self, message: str) -> None:"""Format error message for failed metrics collection.Parameters----------message : strError message to display"""self.table.add_row("ERROR", message)
1
2
2
22
0
271
279
271
self,message
[]
None
{"Expr": 2}
1
9
1
["self.table.add_row"]
0
[]
The function (format_failed_metrics) defined within the public class called MetricsResponseFormatter.The function start at line 271 and ends at 279. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [271.0] and does not return any value. It declare 1.0 function, ...
VectorInstitute_vector-inference
MetricsResponseFormatter
public
0
0
format_metrics
def format_metrics(self) -> None:"""Format and display all available metrics.Formats and adds to the table:- Throughput metrics- Request queue metrics- Cache usage metrics- Prefix cache metrics (if enabled)- Latency metrics- Token counts"""# Throughput metricsself.table.add_row("Prompt Throughput",f"{self.metrics.get('...
3
55
1
176
0
281
355
281
self
[]
None
{"Expr": 14, "If": 2}
25
75
25
["self.table.add_row", "self.metrics.get", "self.table.add_row", "self.metrics.get", "self.table.add_row", "self.metrics.get", "self.table.add_row", "self.metrics.get", "self.table.add_row", "self.metrics.get", "self.table.add_row", "self.metrics.get", "self.table.add_row", "self.metrics.get", "self.table.add_row", "se...
2
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3640381_floydhub_floyd_cli.floyd.cli.experiment_py.info", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3640381_floydhub_floyd_cli.floyd.cli.experiment_py.print_experiments"]
The function (format_metrics) defined within the public class called MetricsResponseFormatter.The function start at line 281 and ends at 355. It contains 55 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 25.0 functions, It has ...
VectorInstitute_vector-inference
LaunchResponseFormatter
public
0
0
__init__
def __init__(self, console: Console, json_mode: bool = False):self.console = consoleself.json_mode = json_modeself.model_config = Noneself.model_names: list[str] = []
1
5
3
41
0
372
376
372
self,model_name,params
[]
None
{"Assign": 2}
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 LaunchResponseFormatter.The function start at line 372 and ends at 376. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [372.0] and does not return any value. It has 14667.0 functions calling this f...