microsoft / qlib

Qlib is an AI-oriented quantitative investment platform that aims to realize the potential, empower research, and create value using AI technologies in quantitative investment, from exploring ideas to implementing productions. Qlib supports diverse machine learning modeling paradigms. including supervised learning, market dynamics modeling, and RL.
https://qlib.readthedocs.io/en/latest/
MIT License
15.53k stars 2.65k forks source link

mlflow file_store.py None object #684

Closed damondd closed 2 years ago

damondd commented 3 years ago

Trying to play with the example after fresh installation and got error below:

python setup.py install
python scripts/get_data.py qlib_data --target_dir ~/qlib_data/cn_data --region cn
python examples/workflow_by_code.py
[925273:MainThread](2021-11-12 16:23:36,060) INFO - qlib.workflow - [record_temp.py:460] - Indicator analysis record 'indicator_analysis_1day.pkl' has been saved as the artifact of the Experiment 1
'The following are analysis results of indicators(1day).'
     value
ffr    1.0
pa     0.0
pos    0.0
Exception in thread Thread-7:
Traceback (most recent call last):
  File "/home/xxx/.conda/envs/qlib/lib/python3.9/threading.py", line 973, in _bootstrap_inner
    self.run()
  File "/home/xxx/.conda/envs/qlib/lib/python3.9/threading.py", line 910, in run
    self._target(*self._args, **self._kwargs)
  File "/home/xxx/.conda/envs/qlib/lib/python3.9/site-packages/pyqlib-0.7.2.99-py3.9-linux-x86_64.egg/qlib/utils/paral.py", line 84, in run
    data()
  File "/home/xxx/.conda/envs/qlib/lib/python3.9/site-packages/pyqlib-0.7.2.99-py3.9-linux-x86_64.egg/qlib/workflow/recorder.py", line 365, in log_metrics
    self.client.log_metric(self.id, name, data, step=step)
  File "/home/xxx/.conda/envs/qlib/lib/python3.9/site-packages/mlflow/tracking/client.py", line 677, in log_metric
    self._tracking_client.log_metric(run_id, key, value, timestamp, step)
  File "/home/xxx/.conda/envs/qlib/lib/python3.9/site-packages/mlflow/tracking/_tracking_service/client.py", line 217, in log_metric
    self.store.log_metric(run_id, metric)
  File "/home/xxx/.conda/envs/qlib/lib/python3.9/site-packages/mlflow/store/tracking/file_store.py", line 768, in log_metric
    run_info = self._get_run_info(run_id)
  File "/home/xxx/.conda/envs/qlib/lib/python3.9/site-packages/mlflow/store/tracking/file_store.py", line 546, in _get_run_info
    run_info = self._get_run_info_from_dir(run_dir)
  File "/home/xxx/.conda/envs/qlib/lib/python3.9/site-packages/mlflow/store/tracking/file_store.py", line 555, in _get_run_info_from_dir
    run_info = _read_persisted_run_info_dict(meta)
  File "/home/xxx/.conda/envs/qlib/lib/python3.9/site-packages/mlflow/store/tracking/file_store.py", line 103, in _read_persisted_run_info_dict
    dict_copy = run_info_dict.copy()
AttributeError: 'NoneType' object has no attribute 'copy'
[925273:MainThread](2021-11-12 16:23:36,089) INFO - qlib.timer - [log.py:113] - Time cost: 0.001s | waiting `async_log` Done

Any idea?

zhupr commented 3 years ago

@damondd Hi, Can you still reproduce the error there? What kind of environment is used: python scripts/collect_info.py all

github-actions[bot] commented 2 years ago

This issue is stale because it has been open for three months with no activity. Remove the stale label or comment on the issue otherwise this will be closed in 5 days