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

add qlib auto init so logger can display info

This commit is contained in:
Xu Yang
2023-05-30 21:52:35 +08:00
parent 2af35d9c89
commit ce39b4b6f8
2 changed files with 4 additions and 2 deletions

View File

@@ -1,6 +1,7 @@
import fire
from qlib.finco.task import WorkflowManager
from dotenv import load_dotenv
from qlib import auto_init
def main(prompt=None):
@@ -10,4 +11,5 @@ def main(prompt=None):
if __name__ == "__main__":
auto_init()
fire.Fire(main)

View File

@@ -124,10 +124,10 @@ class WorkflowTask(Task):
def interact(self) -> Any:
assert self.executed == True, "The workflow task has not been executed yet"
## TODO use logger
print(
self.logger.info(
f"The workflow has been determined to be ---{self._context_manager.get_context('workflow')}---"
)
print(
self.logger.info(
"Enter 'y' to authorise command,'s' to run self-feedback commands, "
"'n' to exit program, or enter feedback for WorkflowTask"
)