Skip to content

Commit

Permalink
try catches are removed and example added
Browse files Browse the repository at this point in the history
  • Loading branch information
Demirrr committed Dec 3, 2024
1 parent a766711 commit cddfc17
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 642 deletions.
21 changes: 9 additions & 12 deletions dicee/analyse_experiments.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
""" This script should be moved to dicee/scripts"""
""" This script should be moved to dicee/scripts
Example:
python dicee/analyse_experiments.py --dir Experiments --features "model" "trainMRR" "testMRR"
"""
import os
import json
import pandas as pd
Expand Down Expand Up @@ -120,19 +123,13 @@ def analyse(args):
if os.path.isdir(full_path) is False:
continue


with open(f'{full_path}/configuration.json', 'r') as f:
config = json.load(f)

try:
with open(f'{full_path}/report.json', 'r') as f:
report = json.load(f)
report = {i: report[i] for i in ['Runtime', 'NumParam']}
with open(f'{full_path}/eval_report.json', 'r') as f:
eval_report = json.load(f)
except FileNotFoundError:
print("NOT found")
continue
with open(f'{full_path}/report.json', 'r') as f:
report = json.load(f)
report = {i: report[i] for i in ['Runtime', 'NumParam']}
with open(f'{full_path}/eval_report.json', 'r') as f:
eval_report = json.load(f)
config.update(eval_report)
config.update(report)
if "Train" in config:
Expand Down
225 changes: 0 additions & 225 deletions examples/LP_BenchmarkResults.md

This file was deleted.

Loading

0 comments on commit cddfc17

Please sign in to comment.