I am using pipeline from decorators. In the pipeline, there is a training step that returns a model (I want this model to also be uploaded as an artifact on clearml). But this results in the following error:
Traceback (most recent call last):
File "/tmp/tmpl17srkeg.py", line 237, in <module>
task.upload_artifact(
File ".../.local/lib/python3.10/site-packages/clearml/task.py", line 1982, in upload_artifact
raise exception_to_raise
File ".../.local/lib/python3.10/site-packages/clearml/task.py", line 1963, in upload_artifact
if self._artifacts_manager.upload_artifact(
File ".../.local/lib/python3.10/site-packages/clearml/binding/artifacts.py", line 744, in upload_artifact
pickle.dump(artifact_object, f)
AttributeError: Can't pickle local object 'main_clf_training.<locals>.lstm_embedding_model'
Note: This occurs only when using pipelines