refactor: refactor core framework to better propogate feedbacks (#599)

* refactor: Update type annotations and remove unused class in evolving modules

* refactor: Simplify evolving agent and feedback handling in CoSTEER module

* lint & CI

* mypy

* ruff for core

* mypy

* refactor: remove unnecessary comments and update feedback handling logic

* refactor: Add prev_task_feedback parameter to evolving strategies

* feat: Clear folder before extracting zip file in DockerEnv

* fix: Correct retrieval of last experiment from history
This commit is contained in:
you-n-g
2025-02-16 01:40:44 +08:00
committed by GitHub
parent 241c05ccac
commit ffc85936f1
24 changed files with 261 additions and 148 deletions
+9 -1
View File
@@ -14,13 +14,21 @@ class Developer(ABC, Generic[ASpecificExp]):
self.scen: Scenario = scen
@abstractmethod
def develop(self, exp: ASpecificExp) -> ASpecificExp:
def develop(self, exp: ASpecificExp) -> ASpecificExp: # TODO: remove return value
"""
Task Generator should take in an experiment.
Because the schedule of different tasks is crucial for the final performance
due to it affects the learning process.
Current constraints:
- The developer should **inplace** edit the exp instead of returning value;
- because we have a lot of use cases to raise errors, but we need the intermediate results in exp.
- So we should remove the return value in the future.
Responsibilities:
- Generate a new experiment after developing on it.
- If it tries to deliver message for future development, it should set a ExperimentFeedback
"""
error_message = "generate method is not implemented."
raise NotImplementedError(error_message)