-
-
Notifications
You must be signed in to change notification settings - Fork 126
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
31 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,35 @@ | ||
from rdagent.components.coder.model_coder.model import ModelImplementation | ||
from rdagent.core.task_generator import TaskGenerator | ||
|
||
|
||
class QlibModelImplementation(TaskGenerator[ModelImplementation]): | ||
# FBTaskImpl... | ||
class QlibModelTaskImpl(ModelTaskImpl): | ||
""" | ||
Docker run | ||
Everything in a folder | ||
- config.yaml | ||
- Pytorch `model.py` | ||
- results in `mlflow` | ||
https://github.com/microsoft/qlib/blob/main/qlib/contrib/model/pytorch_nn.py | ||
- pt_model_uri: hard-code `model.py:Net` in the config | ||
- let LLM modify model.py | ||
Docker-based Qlib image | ||
code should be implementd in a folder, | ||
Then the folder should be mounted into a Qlib docker image | ||
# This is Mr Xiao's work??? | ||
""" | ||
|
||
def __init__(self, **kwargs): | ||
self.kwargs = kwargs | ||
|
||
# def prepare(self): | ||
# pass | ||
|
||
def execute(self): | ||
""" | ||
docker run -v <path to model>:<model in the image> qlib_image | ||
qpte = QPTDockerEnv | ||
qpte.run(local_path=self.XXXXpath, entry="qrun ...") | ||
# TODO: inject exp analysis code | ||
qpte.run(local_path=self.XXXXpath, entry="python read_exp.py") | ||
append following code into read_exp.py | ||
to_pickle() or to_csv() # which does not depend on environment. | ||
read_csv or pickle in RD-Agent Env; | ||
""" |