Skip to content

Commit

Permalink
refactored filter by completion
Browse files Browse the repository at this point in the history
  • Loading branch information
gavin-ho1 committed Aug 1, 2024
1 parent c8e9bb0 commit ebec61b
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion experiments/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@
algo_filter = args.algo
system_filter = args.system
challenge_filter = args.challenge
complete_filter = args.is_complete

directory_path = 'experiments/outputs'

Expand Down Expand Up @@ -277,7 +278,8 @@
}.get(challenge_filter, '')
if challenge_cls_name != challenge_filter_name:
continue



experiment_type = experiment['challenge_cls']['class_name']
total_jobs = experiment.get("total_jobs", 0)
_, data = load_data(dirpath, print_status=False)
Expand All @@ -286,6 +288,13 @@
else:
completed_jobs = data['job_id'].drop_duplicates().to_list()

complete_cls = str(len(completed_jobs) == total_jobs).lower()

#Check complete if filter is set
if complete_filter:
if complete_cls != complete_filter:
continue

# Sort
if experiment_type in experiment_dict.keys():
experiment_dict[experiment_type].append({
Expand Down

0 comments on commit ebec61b

Please sign in to comment.