diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index c5cb1041..aa3c1ef6 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -9,7 +9,7 @@ jobs: steps: # checkout soruce code - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 # setup Python environment - name: Set up Python diff --git a/src/kepler_model/train/extractor/extractor.py b/src/kepler_model/train/extractor/extractor.py index c4410b69..2fa72a7e 100644 --- a/src/kepler_model/train/extractor/extractor.py +++ b/src/kepler_model/train/extractor/extractor.py @@ -174,8 +174,6 @@ def get_workload_feature_data(self, query_results, features, use_vm_metrics=Fals aggr_query_data = aggr_query_data.loc[aggr_query_data["job"] == VM_JOB_NAME] else: aggr_query_data = aggr_query_data.loc[aggr_query_data["job"] != VM_JOB_NAME] - print("aggr query data feature") - print(aggr_query_data.to_string()) aggr_query_data.rename(columns={query: feature}, inplace=True) aggr_query_data[container_id_colname] = aggr_query_data[cols_to_use].apply(lambda x: "/".join([str(xi) for xi in x]), axis=1) # separate for each container_id @@ -228,7 +226,6 @@ def get_workload_feature_data(self, query_results, features, use_vm_metrics=Fals if len(feature_to_remove) != 0: features = self.process_feature(features, feature_to_remove, cur_accelerator_features) # return with reset index for later aggregation - # print(feature_data.reset_index().to_string()) return feature_data.reset_index(), features def get_system_feature_data(self, query_results, features): @@ -262,8 +259,6 @@ def get_power_data(self, query_results, energy_components, source, use_vm_metric aggr_query_data = aggr_query_data.loc[aggr_query_data["job"] != VM_JOB_NAME] # filter source aggr_query_data = aggr_query_data[aggr_query_data[SOURCE_COL] == source] - # print("aggr query data power") - # print(aggr_query_data.to_string()) if len(aggr_query_data) == 0: return None if unit_col is not None: @@ -311,7 +306,6 @@ def get_power_data(self, query_results, energy_components, source, use_vm_metric if len(power_data_list) == 0: return None power_data = pd.concat(power_data_list, axis=1).dropna() - # print(power_data.to_string()) return power_data def get_system_category(self, query_results): diff --git a/tests/estimator_model_request_test.py b/tests/estimator_model_request_test.py index b558bb23..534563f2 100644 --- a/tests/estimator_model_request_test.py +++ b/tests/estimator_model_request_test.py @@ -126,9 +126,9 @@ def test_model_request(): power_request = json.loads(data, object_hook=lambda d: PowerRequest(**d)) output_path = get_achived_model(power_request) assert output_path is None, f"model should be invalid\n {output_path}" - os.environ[ - "MODEL_CONFIG" - ] = f"{estimator_enable_key}=true\n{init_url_key}={get_url(energy_source=energy_source, output_type=output_type, feature_group=FeatureGroup.BPFOnly, model_topurl=model_topurl, pipeline_name=default_train_output_pipeline)}\n" + os.environ["MODEL_CONFIG"] = ( + f"{estimator_enable_key}=true\n{init_url_key}={get_url(energy_source=energy_source, output_type=output_type, feature_group=FeatureGroup.BPFOnly, model_topurl=model_topurl, pipeline_name=default_train_output_pipeline)}\n" + ) set_env_from_model_config() print("Requesting from ", os.environ[init_url_key]) reset_failed_list()