mirror of
https://github.com/NicolasBohn/NexQuant.git
synced 2026-08-07 03:57:45 +00:00
feat: add user interaction in data science scenario (#1251)
* feat: add interactor classes and user interaction handling for experiments * update code * use fragment retry mechanism instead of rerun() * fix a bug * integrate user instructions into proposal and coder * fix CI * fix CI * feat: add approval option for user instructions submission * feat: enhance user instructions handling in Task and DSExperiment classes * fix CI * add user instructions into hypothesis rewrite * add interface to command line --------- Co-authored-by: Bowen Xian <xianbowen@outlook.com>
This commit is contained in:
@@ -61,6 +61,14 @@ def server_ui(port=19899):
|
||||
subprocess.run(["python", "rdagent/log/server/app.py", f"--port={port}"])
|
||||
|
||||
|
||||
def ds_user_interact(port=19900):
|
||||
"""
|
||||
start web app to show the log traces in real time
|
||||
"""
|
||||
commands = ["streamlit", "run", "rdagent/log/ui/ds_user_interact.py", f"--server.port={port}"]
|
||||
subprocess.run(commands)
|
||||
|
||||
|
||||
app.command(name="fin_factor")(fin_factor)
|
||||
app.command(name="fin_model")(fin_model)
|
||||
app.command(name="fin_quant")(fin_quant)
|
||||
@@ -72,6 +80,7 @@ app.command(name="ui")(ui)
|
||||
app.command(name="server_ui")(server_ui)
|
||||
app.command(name="health_check")(health_check)
|
||||
app.command(name="collect_info")(collect_info)
|
||||
app.command(name="ds_user_interact")(ds_user_interact)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
from pathlib import Path
|
||||
from typing import Literal
|
||||
|
||||
from pydantic_settings import SettingsConfigDict
|
||||
@@ -20,6 +21,7 @@ class DataScienceBasePropSetting(KaggleBasePropSetting):
|
||||
|
||||
planner: str = "rdagent.scenarios.data_science.proposal.exp_gen.planner.DSExpPlannerHandCraft"
|
||||
hypothesis_gen: str = "rdagent.scenarios.data_science.proposal.exp_gen.router.ParallelMultiTraceExpGen"
|
||||
interactor: str = "rdagent.components.interactor.SkipInteractor"
|
||||
trace_scheduler: str = "rdagent.scenarios.data_science.proposal.exp_gen.trace_scheduler.RoundRobinScheduler"
|
||||
"""Hypothesis generation class"""
|
||||
|
||||
@@ -182,6 +184,9 @@ class DataScienceBasePropSetting(KaggleBasePropSetting):
|
||||
|
||||
ensemble_time_upper_bound: bool = False
|
||||
|
||||
user_interaction_wait_seconds: int = 6000 # seconds to wait for user interaction
|
||||
user_interaction_mid_folder: Path = Path.cwd() / "git_ignore_folder" / "RD-Agent_user_interaction"
|
||||
|
||||
|
||||
DS_RD_SETTING = DataScienceBasePropSetting()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user