mirror of
https://github.com/NicolasBohn/NexQuant.git
synced 2026-07-28 16:07:46 +00:00
c9346a9377
* Implemented model.py - Need to run within the RDAgent folder (relevant path) - Each time copy a template & insert code & run qlib & store result back to experiment * Create model.py * Create conf.yaml This is the sample conf.yaml to be copied each time. This has gone several times of iteration and is now working for both tabular and Time-Series data. * Create read_exp.py This is to read the results within Qlib * Create ReadMe.md * Update model.py * Create test_model.py A testing file that separates model code generation and running&feedback section. * move the template folder * help xisen finish the model runner * help xisen fix improve model feedback generation * delete debug file * rename readme.md --------- Co-authored-by: Xisen Wang <118058822+Xisen-Wang@users.noreply.github.com>
33 lines
944 B
Python
33 lines
944 B
Python
from abc import ABC, abstractmethod
|
|
from typing import Generic, List
|
|
|
|
from rdagent.core.experiment import ASpecificExp
|
|
from rdagent.core.scenario import Scenario
|
|
|
|
|
|
class TaskGenerator(ABC, Generic[ASpecificExp]):
|
|
def __init__(self, scen: Scenario) -> None:
|
|
self.scen: Scenario = scen
|
|
|
|
@abstractmethod
|
|
def generate(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.
|
|
|
|
"""
|
|
raise NotImplementedError("generate method is not implemented.")
|
|
|
|
def collect_feedback(self, feedback_obj_l: List[object]):
|
|
"""
|
|
When online evaluation.
|
|
The previous feedbacks will be collected to support advanced factor generator
|
|
|
|
Parameters
|
|
----------
|
|
feedback_obj_l : List[object]
|
|
|
|
"""
|