1
0
mirror of https://github.com/microsoft/qlib.git synced 2026-07-05 20:11:08 +08:00

optimize workflow and output format

This commit is contained in:
Fivele-Li
2023-07-20 12:15:04 +08:00
parent f93f331a3b
commit 70a066baf8
12 changed files with 13700 additions and 1 deletions

View File

@@ -13,7 +13,7 @@ class Config(SingletonBaseClass):
def __init__(self):
self.use_azure = os.getenv("USE_AZURE") == "True"
self.temperature = 0.5 if os.getenv("TEMPERATURE") is None else float(os.getenv("TEMPERATURE"))
self.temperature = 0 if os.getenv("TEMPERATURE") is None else float(os.getenv("TEMPERATURE"))
self.max_tokens = 800 if os.getenv("MAX_TOKENS") is None else int(os.getenv("MAX_TOKENS"))
self.openai_api_key = os.getenv("OPENAI_API_KEY")

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

307
qlib/finco/demo_failed.yml Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

2
qlib/finco/record.txt Normal file
View File

@@ -0,0 +1,2 @@
conda activate qlib38
python cli_learn.py "build an A-share stock market daily portfolio in quantitative investment and minimize the maximum drawdown while maintaining return."

View File

@@ -0,0 +1,4 @@
- content: '[Success]: XXXX, the results looks reasonable # Keywords: supervised
learning, data'
- content: '[Fail]: XXXX, it raise memory error due to YYYYY # Keywords: supervised
learning, data'

View File

@@ -0,0 +1 @@
[]

File diff suppressed because it is too large Load Diff

View File

@@ -9,6 +9,7 @@ from qlib.finco.task import SummarizeTask
from qlib.finco.workflow import WorkflowContextManager
from qlib.finco.llm import APIBackend
from qlib.finco.workflow import WorkflowManager
from qlib.finco.knowledge import PracticeKnowledge, YamlStorage
load_dotenv(verbose=True, override=True)
@@ -61,6 +62,9 @@ class TestSummarize(unittest.TestCase):
resp = task.get_info_from_file("")
print(resp)
def test_practice_knowledge(self):
pk = PracticeKnowledge(YamlStorage(path.joinpath(Path.cwd().joinpath("knowledge")/f"{self.KT_PRACTICE}/{YamlStorage.DEFAULT_NAME}")))
pk.add(["test1", "test2"])
if __name__ == "__main__":
unittest.main()