Skip to content

Commit

Permalink
load different formats for parse_dataset_eval
Browse files Browse the repository at this point in the history
  • Loading branch information
kylebystrom committed Jan 24, 2023
1 parent a2c0dcc commit 2c98613
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion orchard/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,11 @@ def get_accdb_formulas(dataset_eval_name):
return formulas

def parse_dataset_eval(subdb_names, dataset_fname):
formulas = get_accdb_formulas(dataset_fname)
if dataset_fname.endswith('.yaml'):
with open(dataset_fname, 'r') as f:
formulas = yaml.load(f, Loader=yaml.Loader)
else:
formulas = get_accdb_formulas(dataset_fname)
cats = {}
sumabs = {}
counts = {}
Expand Down

0 comments on commit 2c98613

Please sign in to comment.