-
-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* support local folder * remove unnecessary random * KaggleScen Subclass * small fix * use template for style description * update default scen to kaggle
- Loading branch information
Showing
12 changed files
with
100 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
from .scen import DataScienceScen | ||
from .kaggle import KaggleScen | ||
|
||
__all__ = ["DataScienceScen"] | ||
__all__ = ["DataScienceScen", "KaggleScen"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import json | ||
|
||
from rdagent.app.data_science.conf import DS_RD_SETTING | ||
from rdagent.core.scenario import Scenario | ||
from rdagent.oai.llm_utils import APIBackend | ||
from rdagent.scenarios.data_science.scen import DataScienceScen | ||
from rdagent.scenarios.kaggle.kaggle_crawler import ( | ||
crawl_descriptions, | ||
leaderboard_scores, | ||
) | ||
from rdagent.utils.agent.tpl import T | ||
|
||
|
||
class KaggleScen(DataScienceScen): | ||
"""Kaggle Scenario | ||
It is based on kaggle now. | ||
- But it is not use the same interface with previous kaggle version. | ||
- Ideally, we should reuse previous kaggle scenario. | ||
But we found that too much scenario unrelated code in kaggle scenario and hard to reuse. | ||
So we start from a simple one.... | ||
""" | ||
def _get_description(self): | ||
return crawl_descriptions(self.competition, DS_RD_SETTING.local_data_path) | ||
|
||
def _get_direction(self): | ||
leaderboard = leaderboard_scores(self.competition) | ||
return "maximize" if float(leaderboard[0]) > float(leaderboard[-1]) else "minimize" | ||
|
||
@property | ||
def rich_style_description(self) -> str: | ||
return T(".prompts:rich_style_description").r( | ||
name="Kaggle", | ||
competition=f"[{self.competition}](https://www.kaggle.com/competitions/{self.competition})", | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters