mirror of
https://github.com/NicolasBohn/NexQuant.git
synced 2026-07-28 16:07:46 +00:00
ae2aa6e9b4
* fix_ruff_error1 * fix_ruff_error * fix ruff error * fix ruff error * pass model.py * rename exception class * rename exception class * rename func name generate_feedback * remove prepare args * optimize code * optimize code * fix code error
27 lines
762 B
Python
27 lines
762 B
Python
from __future__ import annotations
|
|
|
|
from abc import ABC, abstractmethod
|
|
from typing import TYPE_CHECKING, Generic
|
|
|
|
from rdagent.core.experiment import ASpecificExp
|
|
|
|
if TYPE_CHECKING:
|
|
from rdagent.core.scenario import Scenario
|
|
|
|
|
|
class Developer(ABC, Generic[ASpecificExp]):
|
|
def __init__(self, scen: Scenario) -> None:
|
|
self.scen: Scenario = scen
|
|
|
|
@abstractmethod
|
|
def develop(self, exp: ASpecificExp) -> ASpecificExp:
|
|
"""
|
|
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.
|
|
|
|
"""
|
|
error_message = "generate method is not implemented."
|
|
raise NotImplementedError(error_message)
|