mirror of
https://github.com/NicolasBohn/NexQuant.git
synced 2026-07-27 23:47:46 +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:
@@ -169,7 +169,8 @@ pipeline_coder:
|
||||
8. **Try-except blocks are ONLY allowed when reading files. If no files are successfully read, it indicates incorrect file paths or reading methods, not a try-except issue. Try-except is PROHIBITED elsewhere in the code. Assert statements are PROHIBITED throughout the entire code.**
|
||||
9. ATTENTION: ALWAYS use the best saved model (not necessarily final epoch) for predictions. **NEVER create dummy/placeholder submissions (e.g., all 1s, random values)**. If training fails, report failure honestly rather than generating fake submission files.
|
||||
10. You should ALWAYS generate the complete code rather than partial code.
|
||||
11. Strictly follow all specifications and general guidelines described above.
|
||||
11. If the task contains any user instructions, you must strictly follow them. User instructions have the highest priority and should be followed even if they conflict with other specifications or guidelines.
|
||||
12. Strictly follow all specifications and general guidelines described above.
|
||||
|
||||
### Output Format
|
||||
{% if out_spec %}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
from rdagent.core.experiment import ASpecificExp
|
||||
from rdagent.core.interactor import Interactor
|
||||
from rdagent.core.proposal import Trace
|
||||
|
||||
|
||||
class SkipInteractor(Interactor[ASpecificExp]):
|
||||
|
||||
def interact(self, exp: ASpecificExp, trace: Trace) -> ASpecificExp:
|
||||
"""
|
||||
Interact with the user to get feedback or confirmation.
|
||||
|
||||
Responsibilities:
|
||||
- Present the current state of the experiment to the user.
|
||||
- Collect user input to guide the next steps in the experiment.
|
||||
- Rewrite the experiment based on user feedback.
|
||||
"""
|
||||
return exp
|
||||
@@ -11,6 +11,7 @@ class BasePropSetting(ExtendedBaseSettings):
|
||||
knowledge_base: str = ""
|
||||
knowledge_base_path: str = ""
|
||||
hypothesis_gen: str = ""
|
||||
interactor: str = ""
|
||||
hypothesis2experiment: str = ""
|
||||
coder: str = ""
|
||||
runner: str = ""
|
||||
|
||||
Reference in New Issue
Block a user