mirror of
https://github.com/NicolasBohn/NexQuant.git
synced 2026-07-27 23:47:46 +00:00
5d5084b87e
* copy init version * feat: new-york-city-taxi-fare-prediction_template * add move to linear model * Add more details about docker * auto lint * auto lint with new black
37 lines
1.2 KiB
Python
37 lines
1.2 KiB
Python
import unittest
|
|
from pathlib import Path
|
|
|
|
import nbformat
|
|
from rich import print
|
|
|
|
from rdagent.app.kaggle.conf import KAGGLE_IMPLEMENT_SETTING
|
|
from rdagent.oai.llm_utils import APIBackend
|
|
from rdagent.scenarios.kaggle.experiment.workspace import KGFBWorkspace
|
|
from rdagent.scenarios.kaggle.kaggle_crawler import download_data
|
|
from rdagent.utils.agent.ret import PythonAgentOut
|
|
from rdagent.utils.agent.tpl import T
|
|
|
|
|
|
class TestTpl(unittest.TestCase):
|
|
def test_competition_template(self):
|
|
"""
|
|
export KG_COMPETITION=<competition_name> before running this test
|
|
"""
|
|
competition = KAGGLE_IMPLEMENT_SETTING.competition
|
|
print(f"[bold orange]{competition}[/bold orange]")
|
|
download_data(competition)
|
|
ws = KGFBWorkspace(
|
|
template_folder_path=Path(__file__).parent.parent.parent
|
|
/ "rdagent/scenarios/kaggle/experiment"
|
|
/ f"{competition}_template"
|
|
)
|
|
print(ws.workspace_path)
|
|
ws.execute()
|
|
success = (ws.workspace_path / "submission.csv").exists()
|
|
self.assertTrue(success, "submission.csv is not generated")
|
|
# ws.clear()
|
|
|
|
|
|
if __name__ == "__main__":
|
|
unittest.main()
|