Skip to content

Commit

Permalink
Merge pull request #328 from leondavi/dupExpPhase
Browse files Browse the repository at this point in the history
[dupExpPhase] Add an exception if two experiment phase names are identicall
  • Loading branch information
leondavi authored May 17, 2024
2 parents ebfccc1 + 142093d commit f5b2c05
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src_py/apiServer/experiment_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,13 @@ def parse_experiment_flow_json(self, json_path : str, override_csv_path = ""):
num_of_labels = self.exp_flow_json[EXPFLOW_NUM_OF_LABELS_FIELD]
self.set_csv_dataset(csv_file_path, num_of_features, num_of_labels, headers_row)
phases_list = self.exp_flow_json[EXPFLOW_PHASES_FIELD]
phases_names_dict= {}
phase_index = 1
for phase in phases_list:
phase_name = phase[EXPFLOW_PHASES_PHASE_NAME_FIELD]
assert phase_name not in phases_names_dict , "check for duplicate phase names"
phases_names_dict.update({phase_name: phase_index})
phase_index += 1
phase_type = phase[EXPFLOW_PHASES_PHASE_TYPE_FIELD]
sourcePieces = phase[EXPFLOW_PHASES_PHASE_SOURCE_PIECES_FIELD]
source_pieces_inst_list = []
Expand Down

0 comments on commit f5b2c05

Please sign in to comment.