Skip to content

Commit f59e612

Browse files
committed
fix(ci): update the credentails in release workflow
This commit updates the credentials in the release workflow to use the correct secrets defined for the repository. This also updates the extractor and profiler code to make linting and formatting CI pass Signed-off-by: vprashar2929 <[email protected]>
1 parent 522a2cb commit f59e612

File tree

4 files changed

+17
-12
lines changed

4 files changed

+17
-12
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ jobs:
2121
uses: docker/login-action@v2
2222
with:
2323
registry: ${{ vars.IMAGE_REGISTRY }}
24-
username: ${{ secrets.docker_username }}
25-
password: ${{ secrets.docker_password }}
24+
username: ${{ secrets.BOT_NAME }}
25+
password: ${{ secrets.BOT_TOKEN }}
2626

2727
- name: Git set user
2828
shell: bash

src/kepler_model/train/extractor/extractor.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ def get_workload_feature_data(self, query_results, features, use_vm_metrics=Fals
228228
if len(feature_to_remove) != 0:
229229
features = self.process_feature(features, feature_to_remove, cur_accelerator_features)
230230
# return with reset index for later aggregation
231-
#print(feature_data.reset_index().to_string())
231+
# print(feature_data.reset_index().to_string())
232232
return feature_data.reset_index(), features
233233

234234
def get_system_feature_data(self, query_results, features):
@@ -262,8 +262,8 @@ def get_power_data(self, query_results, energy_components, source, use_vm_metric
262262
aggr_query_data = aggr_query_data.loc[aggr_query_data["job"] != VM_JOB_NAME]
263263
# filter source
264264
aggr_query_data = aggr_query_data[aggr_query_data[SOURCE_COL] == source]
265-
#print("aggr query data power")
266-
#print(aggr_query_data.to_string())
265+
# print("aggr query data power")
266+
# print(aggr_query_data.to_string())
267267
if len(aggr_query_data) == 0:
268268
return None
269269
if unit_col is not None:
@@ -311,7 +311,7 @@ def get_power_data(self, query_results, energy_components, source, use_vm_metric
311311
if len(power_data_list) == 0:
312312
return None
313313
power_data = pd.concat(power_data_list, axis=1).dropna()
314-
#print(power_data.to_string())
314+
# print(power_data.to_string())
315315
return power_data
316316

317317
def get_system_category(self, query_results):

src/kepler_model/train/profiler/node_type_index.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -266,9 +266,14 @@ def get_node_type(self, in_spec: NodeTypeSpec, loose_search: bool = False):
266266
return -1, -1, -1
267267
compare_spec = in_spec.copy()
268268
num_of_none = get_num_of_none(compare_spec)
269-
similarity_map, max_similarity, most_similar_index, has_candidate, candidate_uncertain_attribute_freq, candidate_uncertain_attribute_total = (
270-
self._find_candidates(in_spec, loose_search)
271-
)
269+
(
270+
similarity_map,
271+
max_similarity,
272+
most_similar_index,
273+
has_candidate,
274+
candidate_uncertain_attribute_freq,
275+
candidate_uncertain_attribute_total,
276+
) = self._find_candidates(in_spec, loose_search)
272277
if max_similarity == 1:
273278
return most_similar_index, 0, 0
274279
if has_candidate:

tests/estimator_model_request_test.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,9 @@ def test_model_request():
126126
power_request = json.loads(data, object_hook=lambda d: PowerRequest(**d))
127127
output_path = get_achived_model(power_request)
128128
assert output_path is None, f"model should be invalid\n {output_path}"
129-
os.environ["MODEL_CONFIG"] = (
130-
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"
131-
)
129+
os.environ[
130+
"MODEL_CONFIG"
131+
] = 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"
132132
set_env_from_model_config()
133133
print("Requesting from ", os.environ[init_url_key])
134134
reset_failed_list()

0 commit comments

Comments
 (0)