Skip to content

TypeError: cannot pickle '_thread.RLock' object #625

Description

@dingtine

[2628:MainThread](2021-09-29 10:48:13,029) ERROR - qlib.workflow - [utils.py:38] - An exception has been raised[TypeError: cannot pickle '_thread.RLock' object].
File "/Library/Frameworks/Python.framework/Versions/3.8/bin/qrun", line 8, in
sys.exit(run())
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/qlib/workflow/cli.py", line 62, in run
fire.Fire(workflow)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/fire/core.py", line 141, in Fire
component_trace = _Fire(component, args, parsed_flag_args, context, name)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/fire/core.py", line 466, in _Fire
component, remaining_args = _CallAndUpdateTrace(
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/fire/core.py", line 681, in _CallAndUpdateTrace
component = fn(*varargs, kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/qlib/workflow/cli.py", line 56, in workflow
recorder = task_train(config.get("task"), experiment_name=experiment_name)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/qlib/model/trainer.py", line 101, in task_train
recorder = end_task_train(recorder, experiment_name)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/qlib/model/trainer.py", line 65, in end_task_train
R.save_objects(
{"params.pkl": model})
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/qlib/workflow/init.py", line 449, in save_objects
self.get_exp().get_recorder().save_objects(local_path, artifact_path, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/qlib/workflow/recorder.py", line 311, in save_objects
pickle.dump(data, f)
TypeError: cannot pickle '_thread.RLock' object

When run TFT sample model, got the above error.


**- Python version: 3.8

  • OS : MacOS
  • device: CPU**

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions