Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Enabling automation of experiments running v2.0 #469

Open
wants to merge 24 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
8726ab8
Revising to enable automation of experiments running v1.0
xisen-w Nov 4, 2024
b44bef5
Any new updates
xisen-w Nov 15, 2024
c100876
Revising to enable automation of experiments running v1.0
xisen-w Nov 4, 2024
18370d4
Any new updates
xisen-w Nov 15, 2024
21a99d2
Add template
you-n-g Nov 15, 2024
86ae0b2
Stoping tracking additional env
xisen-w Nov 20, 2024
f94dbff
Merge branch 'automated-evaluation' of https://github.com/microsoft/R…
xisen-w Nov 20, 2024
66ffd6d
Uploading relevant envs
xisen-w Nov 20, 2024
0ef80a5
Adding tests
xisen-w Nov 20, 2024
907d980
Updating
xisen-w Nov 20, 2024
51388d1
Updated collect.py to extract result from trace
xisen-w Nov 23, 2024
af6220e
Update .gitignore to remove the unecessary ones
xisen-w Nov 23, 2024
54c3c6d
"Remove unnecessary files"
xisen-w Nov 23, 2024
78708e4
Merge branch 'automated-evaluation' of https://github.com/microsoft/R…
xisen-w Nov 25, 2024
3f131f3
Merge branch 'main' into automated-evaluation
xisen-w Nov 25, 2024
38bb9e6
Updated to enable automatic collection of experiment result information
xisen-w Nov 25, 2024
10b0053
Updating the env files & Upading test_system file
xisen-w Nov 25, 2024
238f492
Updated relevant env for better testing
xisen-w Nov 25, 2024
68ca63a
Updated README.md
xisen-w Nov 25, 2024
8b18fad
reverting gitignore back
xisen-w Nov 25, 2024
2395dc5
Updates
xisen-w Dec 3, 2024
b7cc98e
README update
xisen-w Dec 3, 2024
0b5a09d
Updates on env README
xisen-w Dec 3, 2024
24cd0c2
Updating collect.py
xisen-w Dec 3, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Updating collect.py
  • Loading branch information
xisen-w committed Dec 3, 2024
commit 24cd0c24e12627cad22f149e4688d8e885ab186c
19 changes: 14 additions & 5 deletions scripts/exp/tools/collect.py
Original file line number Diff line number Diff line change
@@ -7,6 +7,7 @@
from rdagent.scenarios.kaggle.kaggle_crawler import (
leaderboard_scores,
)
import pandas as pd

def collect_results(log_path) -> list[dict]:
summary = []
@@ -39,24 +40,32 @@ def generate_summary(results, output_path):
}
for result in results:
# Update best result
# If the evaluation metric is higher, it is better
if result["evaluation_metric_direction"]:
if (result["score"] is not None and
(summary["best_result"]["score"] is None or
result["score"] > summary["best_result"]["score"])):
(result["score"].iloc[0] > summary["best_result"]["score"]))):
summary["best_result"].update({
"score": result["score"],
"score": result["score"].iloc[0] if isinstance(result["score"], pd.Series) else result["score"],
"competition_name": result["competition_name"]
})
else:
if (result["score"] is not None and
(summary["best_result"]["score"] is None or
result["score"] < summary["best_result"]["score"])):
(result["score"].iloc[0] < summary["best_result"]["score"]))):
summary["best_result"].update({
"score": result["score"],
"score": result["score"].iloc[0] if isinstance(result["score"], pd.Series) else result["score"],
"competition_name": result["competition_name"]
})

# Convert Series to scalar or list if necessary
for key, value in summary.items():
if isinstance(value, pd.Series):
summary[key] = value.tolist() # Convert Series to list
elif isinstance(value, dict):
for sub_key, sub_value in value.items():
if isinstance(sub_value, pd.Series):
value[sub_key] = sub_value.tolist() # Convert Series to list

with open(output_path, "w") as f:
json.dump(summary, f, indent=4)

Loading
Oops, something went wrong.