Skip to content

Commit

Permalink
Merge pull request #524 from vprashar2929/chore-clean-logs
Browse files Browse the repository at this point in the history
chore: remove debugging print statements
  • Loading branch information
sthaha authored Oct 24, 2024
2 parents 78e69f4 + 21a25b4 commit f87a45e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 0 additions & 6 deletions src/kepler_model/train/extractor/extractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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):
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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):
Expand Down
6 changes: 3 additions & 3 deletions tests/estimator_model_request_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit f87a45e

Please sign in to comment.