Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: GreatExpectations materializer not automatically selected #2604

Open
1 task done
tensortorch opened this issue Apr 10, 2024 · 1 comment
Open
1 task done
Assignees
Labels
bug Something isn't working

Comments

@tensortorch
Copy link

tensortorch commented Apr 10, 2024

Contact Details [Optional]

No response

System Information

ZENML_LOCAL_VERSION: 0.56.3
ZENML_SERVER_VERSION: 0.56.3
ZENML_SERVER_DATABASE: sqlite
ZENML_SERVER_DEPLOYMENT_TYPE: other
ZENML_CONFIG_DIR: /Users/redacted/Library/Application Support/zenml
ZENML_LOCAL_STORE_DIR: /Users/redacted/Library/Application Support/zenml/local_stores
ZENML_SERVER_URL: sqlite:////Users/redacted/Library/Application Support/zenml/local_stores/default_zen_store/zenml.db
ZENML_ACTIVE_REPOSITORY_ROOT: None
PYTHON_VERSION: 3.10.13
ENVIRONMENT: native
SYSTEM_INFO: {'os': 'mac', 'mac_version': '14.4'}
ACTIVE_WORKSPACE: default
ACTIVE_STACK: unittest_great_expectations_stack
ACTIVE_USER: default
TELEMETRY_STATUS: enabled
ANALYTICS_CLIENT_ID: 240fc7e6-23e5-44a8-8ca6-0b5188b19787
ANALYTICS_USER_ID: 387d49fa-58f1-4213-a3a4-f96cca09b02f
ANALYTICS_SERVER_ID: 240fc7e6-23e5-44a8-8ca6-0b5188b19787
INTEGRATIONS: ['bitbucket', 'kaniko', 'scipy']
PACKAGES: {'babel': '2.14.0', 'gitpython': '3.1.43', 'jinja2': '3.1.3', 'mako': '1.3.2', 'markupsafe': '2.1.5', 'pyjwt': '2.7.0', 'pymysql': '1.0.3', 'pyyaml': '6.0.1',
'sqlalchemy': '1.4.41', 'sqlalchemy-utils': '0.38.3', 'send2trash': '1.8.3', 'aiohttp': '3.9.3', 'aiosignal': '1.3.1', 'alembic': '1.8.1', 'altair': '4.2.2', 'anyio': '4.3.0',
'appnope': '0.1.4', 'argon2-cffi': '23.1.0', 'argon2-cffi-bindings': '21.2.0', 'arrow': '1.3.0', 'asttokens': '2.4.1', 'async-lru': '2.0.4', 'async-timeout': '4.0.3', 'attrs':
'23.2.0', 'azure-common': '1.1.28', 'azure-core': '1.30.1', 'azure-mgmt-core': '1.4.0', 'azure-mgmt-resource': '23.0.1', 'bcrypt': '4.0.1', 'beautifulsoup4': '4.12.3',
'bleach': '6.1.0', 'cachetools': '5.3.3', 'certifi': '2024.2.2', 'cffi': '1.16.0', 'charset-normalizer': '3.3.2', 'click': '8.1.3', 'click-params': '0.3.0', 'cloudpickle':
'2.2.1', 'colorama': '0.4.6', 'comm': '0.2.2', 'cryptography': '42.0.5', 'debugpy': '1.8.1', 'decorator': '5.1.1', 'defusedxml': '0.7.1', 'distro': '1.9.0', 'docker': '6.1.3',
'ecdsa': '0.19.0', 'entrypoints': '0.4', 'exceptiongroup': '1.2.0', 'executing': '2.0.1', 'fastapi': '0.110.1', 'fastapi-utils': '0.2.1', 'fastjsonschema': '2.19.1', 'fqdn':
'1.5.1', 'frozenlist': '1.4.1', 'gitdb': '4.0.11', 'great-expectations': '0.15.21', 'h11': '0.14.0', 'httpcore': '1.0.5', 'httplib2': '0.19.1', 'httptools': '0.6.1', 'httpx':
'0.27.0', 'idna': '3.6', 'importlib-metadata': '7.1.0', 'ipinfo': '5.0.1', 'ipykernel': '6.29.4', 'ipython': '8.23.0', 'ipywidgets': '8.1.2', 'isodate': '0.6.1',
'isoduration': '20.11.0', 'jedi': '0.19.1', 'json5': '0.9.24', 'jsonpatch': '1.33', 'jsonpointer': '2.4', 'jsonschema': '4.21.1', 'jsonschema-specifications': '2023.12.1',
'jupyter-client': '8.6.1', 'jupyter-core': '5.7.2', 'jupyter-events': '0.10.0', 'jupyter-lsp': '2.2.5', 'jupyter-server': '2.13.0', 'jupyter-server-terminals': '0.5.3',
'jupyterlab': '4.1.6', 'jupyterlab-pygments': '0.3.0', 'jupyterlab-server': '2.26.0', 'jupyterlab-widgets': '3.0.10', 'makefun': '1.15.2', 'markdown-it-py': '3.0.0',
'marshmallow': '3.8.0', 'matplotlib-inline': '0.1.6', 'mdurl': '0.1.2', 'mistune': '3.0.2', 'multidict': '6.0.5', 'nbclient': '0.10.0', 'nbconvert': '7.16.3', 'nbformat':
'5.10.4', 'nest-asyncio': '1.6.0', 'notebook': '7.1.2', 'notebook-shim': '0.2.4', 'numpy': '1.26.4', 'orjson': '3.10.0', 'overrides': '7.7.0', 'packaging': '24.0', 'pandas':
'2.2.1', 'pandocfilters': '1.5.1', 'parso': '0.8.4', 'passlib': '1.7.4', 'pexpect': '4.9.0', 'pip': '24.0', 'platformdirs': '4.2.0', 'prometheus-client': '0.20.0',
'prompt-toolkit': '3.0.43', 'psutil': '5.9.8', 'ptyprocess': '0.7.0', 'pure-eval': '0.2.2', 'pyarrow': '14.0.2', 'pyasn1': '0.6.0', 'pycparser': '2.22', 'pydantic': '1.10.15',
'pygments': '2.17.2', 'pyparsing': '2.4.7', 'python-dateutil': '2.9.0.post0', 'python-dotenv': '1.0.1', 'python-jose': '3.3.0', 'python-json-logger': '2.0.7',
'python-multipart': '0.0.9', 'python-terraform': '0.10.1', 'pytz': '2024.1', 'pyzmq': '25.1.2', 'referencing': '0.34.0', 'requests': '2.31.0', 'rfc3339-validator': '0.1.4',
'rfc3986-validator': '0.1.1', 'rich': '13.7.1', 'rpds-py': '0.18.0', 'rsa': '4.9', 'ruamel.yaml': '0.17.17', 'scipy': '1.13.0', 'secure': '0.3.0', 'setuptools': '69.1.1',
'six': '1.16.0', 'smmap': '5.0.1', 'sniffio': '1.3.1', 'soupsieve': '2.5', 'sqlalchemy2-stubs': '0.0.2a38', 'sqlmodel': '0.0.8', 'stack-data': '0.6.3', 'starlette': '0.37.2',
'termcolor': '2.4.0', 'terminado': '0.18.1', 'tinycss2': '1.2.1', 'tomli': '2.0.1', 'toolz': '0.12.1', 'tornado': '6.4', 'tqdm': '4.66.2', 'traitlets': '5.14.2',
'types-python-dateutil': '2.9.0.20240316', 'typing-extensions': '4.11.0', 'tzdata': '2024.1', 'tzlocal': '5.2', 'uri-template': '1.3.0', 'urllib3': '1.26.18', 'uvicorn':
'0.29.0', 'uvloop': '0.19.0', 'validators': '0.18.2', 'watchfiles': '0.21.0', 'wcwidth': '0.2.13', 'webcolors': '1.13', 'webencodings': '0.5.1', 'websocket-client': '1.7.0',
'websockets': '12.0', 'widgetsnbextension': '4.0.10', 'yarl': '1.9.4', 'zenml': '0.56.3', 'zipp': '3.18.1'}

CURRENT STACK

Name: unittest_great_expectations_stack
ID: 1c681df8-bdfc-47b0-b85f-ec0fe8552ac3
User: default / 387d49fa-58f1-4213-a3a4-f96cca09b02f
Workspace: default / fd87be62-6140-44a0-bbd0-c0d3df00baf9

ORCHESTRATOR: default-387d

Name: default-387d
ID: d65e0b64-f45e-4568-b53a-f80ef29f3a85
Type: orchestrator
Flavor: local
Configuration: {}
User: default / 387d49fa-58f1-4213-a3a4-f96cca09b02f
Workspace: default / fd87be62-6140-44a0-bbd0-c0d3df00baf9

ARTIFACT_STORE: default-387d

Name: default-387d
ID: 6ba6e9cc-9de7-44b3-98f0-cb1ed8e84ee5
Type: artifact_store
Flavor: local
Configuration: {'path': ''}
User: default / 387d49fa-58f1-4213-a3a4-f96cca09b02f
Workspace: default / fd87be62-6140-44a0-bbd0-c0d3df00baf9

DATA_VALIDATOR: unittest_ge_data_validator

Name: unittest_ge_data_validator
ID: 8b7e55aa-4ed1-43fe-8b85-afa37a8567c2
Type: data_validator
Flavor: great_expectations
Configuration: {'context_root_dir': None, 'context_config': None, 'configure_zenml_stores': False, 'configure_local_docs': True}
User: default / 387d49fa-58f1-4213-a3a4-f96cca09b02f
Workspace: default / fd87be62-6140-44a0-bbd0-c0d3df00baf9

What happened?

After the upgrade to ZenML 0.55.4 (from 0.44, skipping versions between those), my pipeline started failing at a step returning a Great Expectations ExpectationSuite object, previously it was working fine.

The issue is that ZenML does not automatically select the GreatExpectations materializer for the ExpectationSuite object. I can work around this by manually specifying the correct materializer with

steps:
  create_expectation_suite_step:
  outputs:
   output:
    materializer_source: zenml.integrations.great_expectations.materializers.ge_materializer.GreatExpectationsMaterializer

But I believe this should not be necessary, as it was the case in previous versions.

Reproduction steps

  1. Create a pipeline with a step returning a great_expectations.core.ExpectationSuite object
  2. Try to run the pipeline with ZenML 0.55.4-0.56.3
  3. Observe the bug

Minimal pipeline:

from zenml import step, pipeline
from great_expectations.core import ExpectationSuite
from zenml.integrations.great_expectations.data_validators import (
    GreatExpectationsDataValidator,
)


@step
def ge_step() -> ExpectationSuite:
    context = GreatExpectationsDataValidator.get_data_context()
    return context.create_expectation_suite(
        expectation_suite_name="test-suite",
        overwrite_existing=True,
    )


@pipeline
def pipeline():
    ge_step()


if __name__ == '__main__':
    pipeline()

Relevant log output

Reusing registered pipeline version: (version: 1).
Executing a new run.
Using user: default
Using stack: unittest_great_expectations_stack
  artifact_store: default-387d
  data_validator: unittest_ge_data_validator
  orchestrator: default-387d
You can visualize your pipeline runs in the ZenML Dashboard. In order to try it locally, please run zenml up.
Step ge_step has started.
No materializer is registered for type <class 'great_expectations.core.expectation_suite.ExpectationSuite'>, so the default Pickle materializer was used. Pickle is not production ready and should only be used for prototyping as the artifacts cannot be loaded when running with a different Python version. Please consider implementing a custom materializer for type <class 'great_expectations.core.expectation_suite.ExpectationSuite'> according to the instructions at https://docs.zenml.io/user-guide/advanced-guide/artifact-management/handle-custom-data-types
Failed to run step ge_step.
cannot pickle '_thread.lock' object
Traceback (most recent call last):
  File "/Users/redacted/Library/Caches/pypoetry/virtualenvs/non-package-mode-dH0jtVFa-py3.10/lib/python3.10/site-packages/zenml/orchestrators/step_launcher.py", line 230, in launch
    self._run_step(
  File "/Users/redacted/Library/Caches/pypoetry/virtualenvs/non-package-mode-dH0jtVFa-py3.10/lib/python3.10/site-packages/zenml/orchestrators/step_launcher.py", line 439, in _run_step
    self._run_step_without_step_operator(
  File "/Users/redacted/Library/Caches/pypoetry/virtualenvs/non-package-mode-dH0jtVFa-py3.10/lib/python3.10/site-packages/zenml/orchestrators/step_launcher.py", line 514, in _run_step_without_step_operator
    runner.run(
  File "/Users/redacted/Library/Caches/pypoetry/virtualenvs/non-package-mode-dH0jtVFa-py3.10/lib/python3.10/site-packages/zenml/orchestrators/step_runner.py", line 250, in run
    output_artifact_ids = self._store_output_artifacts(
  File "/Users/redacted/Library/Caches/pypoetry/virtualenvs/non-package-mode-dH0jtVFa-py3.10/lib/python3.10/site-packages/zenml/orchestrators/step_runner.py", line 622, in _store_output_artifacts
    artifact = save_artifact(
  File "/Users/redacted/Library/Caches/pypoetry/virtualenvs/non-package-mode-dH0jtVFa-py3.10/lib/python3.10/site-packages/zenml/artifacts/utils.py", line 183, in save_artifact
    materializer_object.save(data)
  File "/Users/redacted/Library/Caches/pypoetry/virtualenvs/non-package-mode-dH0jtVFa-py3.10/lib/python3.10/site-packages/zenml/materializers/cloudpickle_materializer.py", line 114, in save
    cloudpickle.dump(data, fid)
  File "/Users/redacted/Library/Caches/pypoetry/virtualenvs/non-package-mode-dH0jtVFa-py3.10/lib/python3.10/site-packages/cloudpickle/cloudpickle_fast.py", line 57, in dump
    ).dump(obj)
  File "/Users/redacted/Library/Caches/pypoetry/virtualenvs/non-package-mode-dH0jtVFa-py3.10/lib/python3.10/site-packages/cloudpickle/cloudpickle_fast.py", line 632, in dump
    return Pickler.dump(self, obj)
TypeError: cannot pickle '_thread.lock' object
Pipeline run pipeline-2024_04_10-09_03_09_440680 failed.
╭───────────────────── Traceback (most recent call last) ──────────────────────╮
│ /Users/redacted/repos/MachineLearning/misc/ZenML-Tutorial/minimal_pi │
│ peline.py:23 in <module>                                                     │
│                                                                              │
│   20                                                                         │
│   21                                                                         │
│   22 if __name__ == '__main__':                                              │
│ ❱ 23 │   pipeline()                                                          │
│   24                                                                         │
│                                                                              │
│ /Users/redacted/Library/Caches/pypoetry/virtualenvs/non-package-mode │
│ -dH0jtVFa-py3.10/lib/python3.10/site-packages/zenml/new/pipelines/pipeline.p │
│ y:1396 in __call__                                                           │
│                                                                              │
│   1393 │   │   │   return self.entrypoint(*args, **kwargs)                   │
│   1394 │   │                                                                 │
│   1395 │   │   self.prepare(*args, **kwargs)                                 │
│ ❱ 1396 │   │   return self._run(**self._run_args)                            │
│   1397 │                                                                     │
│   1398 │   def _call_entrypoint(self, *args: Any, **kwargs: Any) -> None:    │
│   1399 │   │   """Calls the pipeline entrypoint function with the given argu │
│                                                                              │
│ /Users/redacted/Library/Caches/pypoetry/virtualenvs/non-package-mode │
│ -dH0jtVFa-py3.10/lib/python3.10/site-packages/zenml/new/pipelines/pipeline.p │
│ y:758 in _run                                                                │
│                                                                              │
│    755 │   │   │   │   │   │   "`zenml up`."
│    756 │   │   │   │   │   )                                                 │
│    757 │   │   │                                                             │
│ ❱  758 │   │   │   deploy_pipeline(                                          │
│    759 │   │   │   │   deployment=deployment_model, stack=stack, placeholder │
│    760 │   │   │   )                                                         │
│    761                                                                       │
│                                                                              │
│ /Users/redacted/Library/Caches/pypoetry/virtualenvs/non-package-mode │
│ -dH0jtVFa-py3.10/lib/python3.10/site-packages/zenml/new/pipelines/run_utils. │
│ py:148 in deploy_pipeline                                                    │
│                                                                              │
│   145 │   │   │   # placeholder run to stay in the database                  │
│   146 │   │   │   Client().delete_pipeline_run(placeholder_run.id)           │
│   147 │   │                                                                  │
│ ❱ 148 │   │   raise e                                                        │
│   149 │   finally:                                                           │
│   150 │   │   constants.SHOULD_PREVENT_PIPELINE_EXECUTION = previous_value   │
│   151                                                                        │
│                                                                              │
│ /Users/redacted/Library/Caches/pypoetry/virtualenvs/non-package-mode │
│ -dH0jtVFa-py3.10/lib/python3.10/site-packages/zenml/new/pipelines/run_utils. │
│ py:136 in deploy_pipeline                                                    │
│                                                                              │
│   133 │   previous_value = constants.SHOULD_PREVENT_PIPELINE_EXECUTION       │
│   134 │   constants.SHOULD_PREVENT_PIPELINE_EXECUTION = True                 │
│   135 │   try:                                                               │
│ ❱ 136 │   │   stack.deploy_pipeline(deployment=deployment)                   │
│   137 │   except Exception as e:                                             │
│   138 │   │   if (                                                           │
│   139 │   │   │   placeholder_run                                            │
│                                                                              │
│ /Users/redacted/Library/Caches/pypoetry/virtualenvs/non-package-mode │
│ -dH0jtVFa-py3.10/lib/python3.10/site-packages/zenml/stack/stack.py:853 in    │
│ deploy_pipeline                                                              │
│                                                                              │
│    850 │   │   Returns:                                                      │
│    851 │   │   │   The return value of the call to `orchestrator.run_pipelin │
│    852 │   │   """
│ ❱  853 │   │   return self.orchestrator.run(deployment=deployment, stack=sel │
│    854 │                                                                     │
│    855 │   def _get_active_components_for_step(                              │
│    856 │   │   self, step_config: "StepConfiguration"
│                                                                              │
│ /Users/redacted/Library/Caches/pypoetry/virtualenvs/non-package-mode │
│ -dH0jtVFa-py3.10/lib/python3.10/site-packages/zenml/orchestrators/base_orche │
│ strator.py:175 in run                                                        │
│                                                                              │
│   172 │   │   environment = get_config_environment_vars(deployment=deploymen │
│   173 │   │                                                                  │
│   174 │   │   try:                                                           │
│ ❱ 175 │   │   │   result = self.prepare_or_run_pipeline(                     │
│   176 │   │   │   │   deployment=deployment, stack=stack, environment=enviro │
│   177 │   │   │   )                                                          │
│   178 │   │   finally:                                                       │
│                                                                              │
│ /Users/redacted/Library/Caches/pypoetry/virtualenvs/non-package-mode │
│ -dH0jtVFa-py3.10/lib/python3.10/site-packages/zenml/orchestrators/local/loca │
│ l_orchestrator.py:78 in prepare_or_run_pipeline                              │
│                                                                              │
│    75 │   │   │   │   │   step_name,                                         │
│    76 │   │   │   │   )                                                      │
│    77 │   │   │                                                              │
│ ❱  78 │   │   │   self.run_step(                                             │
│    79 │   │   │   │   step=step,                                             │
│    80 │   │   │   )                                                          │
│    81                                                                        │
│                                                                              │
│ /Users/redacted/Library/Caches/pypoetry/virtualenvs/non-package-mode │
│ -dH0jtVFa-py3.10/lib/python3.10/site-packages/zenml/orchestrators/base_orche │
│ strator.py:195 in run_step                                                   │
│                                                                              │
│   192 │   │   │   step=step,                                                 │
│   193 │   │   │   orchestrator_run_id=self.get_orchestrator_run_id(),        │
│   194 │   │   )                                                              │
│ ❱ 195 │   │   launcher.launch()                                              │
│   196 │                                                                      │
│   197 │   @staticmethod                                                      │
│   198 │   def requires_resources_in_orchestration_environment(               │
│                                                                              │
│ /Users/redacted/Library/Caches/pypoetry/virtualenvs/non-package-mode │
│ -dH0jtVFa-py3.10/lib/python3.10/site-packages/zenml/orchestrators/step_launc │
│ her.py:230 in launch                                                         │
│                                                                              │
│   227 │   │   │   │   logger.info(f"Step `{self._step_name}` has started.")  │
│   228 │   │   │   │   if execution_needed:                                   │
│   229 │   │   │   │   │   try:                                               │
│ ❱ 230 │   │   │   │   │   │   self._run_step(                                │
│   231 │   │   │   │   │   │   │   pipeline_run=pipeline_run,                 │
│   232 │   │   │   │   │   │   │   step_run=step_run_response,                │
│   233 │   │   │   │   │   │   )                                              │
│                                                                              │
│ /Users/redacted/Library/Caches/pypoetry/virtualenvs/non-package-mode │
│ -dH0jtVFa-py3.10/lib/python3.10/site-packages/zenml/orchestrators/step_launc │
│ her.py:439 in _run_step                                                      │
│                                                                              │
│   436 │   │   │   │   │   step_run_info=step_run_info,                       │
│   437 │   │   │   │   )                                                      │
│   438 │   │   │   else:                                                      │
│ ❱ 439 │   │   │   │   self._run_step_without_step_operator(                  │
│   440 │   │   │   │   │   pipeline_run=pipeline_run,                         │
│   441 │   │   │   │   │   step_run=step_run,                                 │
│   442 │   │   │   │   │   step_run_info=step_run_info,                       │
│                                                                              │
│ /Users/redacted/Library/Caches/pypoetry/virtualenvs/non-package-mode │
│ -dH0jtVFa-py3.10/lib/python3.10/site-packages/zenml/orchestrators/step_launc │
│ her.py:514 in _run_step_without_step_operator                                │
│                                                                              │
│   511 │   │   │   output_artifact_uris: The output artifact URIs of the curr │
│   512 │   │   """
│   513 │   │   runner = StepRunner(step=self._step, stack=self._stack)        │
│ ❱ 514 │   │   runner.run(                                                    │
│   515 │   │   │   pipeline_run=pipeline_run,                                 │
│   516 │   │   │   step_run=step_run,                                         │
│   517 │   │   │   input_artifacts=input_artifacts,                           │
│                                                                              │
│ /Users/redacted/Library/Caches/pypoetry/virtualenvs/non-package-mode │
│ -dH0jtVFa-py3.10/lib/python3.10/site-packages/zenml/orchestrators/step_runne │
│ r.py:250 in run                                                              │
│                                                                              │
│   247 │   │   │   │   │   │   │   is_enabled_on_step=step_run_info.config.en │
│   248 │   │   │   │   │   │   │   is_enabled_on_pipeline=step_run_info.pipel │
│   249 │   │   │   │   │   │   )                                              │
│ ❱ 250 │   │   │   │   │   │   output_artifact_ids = self._store_output_artif │
│   251 │   │   │   │   │   │   │   output_data=output_data,                   │
│   252 │   │   │   │   │   │   │   output_artifact_uris=output_artifact_uris, │
│   253 │   │   │   │   │   │   │   output_materializers=output_materializers, │
│                                                                              │
│ /Users/redacted/Library/Caches/pypoetry/virtualenvs/non-package-mode │
│ -dH0jtVFa-py3.10/lib/python3.10/site-packages/zenml/orchestrators/step_runne │
│ r.py:622 in _store_output_artifacts                                          │
│                                                                              │
│   619 │   │   │   # Get full set of tags                                     │
│   620 │   │   │   tags = step_context.get_output_tags(output_name)           │
│   621 │   │   │                                                              │
│ ❱ 622 │   │   │   artifact = save_artifact(                                  │
│   623 │   │   │   │   name=artifact_name,                                    │
│   624 │   │   │   │   data=return_value,                                     │
│   625 │   │   │   │   materializer=materializer_class,                       │
│                                                                              │
│ /Users/redacted/Library/Caches/pypoetry/virtualenvs/non-package-mode │
│ -dH0jtVFa-py3.10/lib/python3.10/site-packages/zenml/artifacts/utils.py:183   │
│ in save_artifact                                                             │
│                                                                              │
│   180 │   # Save the artifact to the artifact store                          │
│   181 │   data_type = type(data)                                             │
│   182 │   materializer_object.validate_type_compatibility(data_type)         │
│ ❱ 183 │   materializer_object.save(data)                                     │
│   184 │                                                                      │
│   185 │   # Save visualizations of the artifact                              │
│   186 │   visualizations: List[ArtifactVisualizationRequest] = []            │
│                                                                              │
│ /Users/redacted/Library/Caches/pypoetry/virtualenvs/non-package-mode │
│ -dH0jtVFa-py3.10/lib/python3.10/site-packages/zenml/materializers/cloudpickl │
│ e_materializer.py:114 in save                                                │
│                                                                              │
│   111 │   │   # save data                                                    │
│   112 │   │   filepath = os.path.join(self.uri, DEFAULT_FILENAME)            │
│   113 │   │   with self.artifact_store.open(filepath, "wb") as fid:          │
│ ❱ 114 │   │   │   cloudpickle.dump(data, fid)                                │
│   115 │                                                                      │
│   116 │   def _save_python_version(self) -> None:                            │
│   117 │   │   """Saves the Python version used to materialize the artifact." │
│                                                                              │
│ /Users/redacted/Library/Caches/pypoetry/virtualenvs/non-package-mode │
│ -dH0jtVFa-py3.10/lib/python3.10/site-packages/cloudpickle/cloudpickle_fast.p │
│ y:57 in dump                                                                 │
│                                                                              │
│    54 │   │   """                                                            │
│    55 │   │   CloudPickler(                                                  │
│    56 │   │   │   file, protocol=protocol, buffer_callback=buffer_callback   │
│ ❱  57 │   │   ).dump(obj)                                                    │
│    58 │                                                                      │
│    59 │   def dumps(obj, protocol=None, buffer_callback=None):               │
│    60 │   │   """Serialize obj as a string of bytes allocated in memory      │
│                                                                              │
│ /Users/redacted/Library/Caches/pypoetry/virtualenvs/non-package-mode │
│ -dH0jtVFa-py3.10/lib/python3.10/site-packages/cloudpickle/cloudpickle_fast.p │
│ y:632 in dump                                                                │
│                                                                              │
│   629 │                                                                      │
│   630 │   def dump(self, obj):                                               │
│   631 │   │   try:                                                           │
│ ❱ 632 │   │   │   return Pickler.dump(self, obj)                             │
│   633 │   │   except RuntimeError as e:                                      │
│   634 │   │   │   if "recursion" in e.args[0]:                               │
│   635 │   │   │   │   msg = (                                                │
╰──────────────────────────────────────────────────────────────────────────────╯
TypeError: cannot pickle '_thread.lock' object

Process finished with exit code 1

Code of Conduct

  • I agree to follow this project's Code of Conduct
@tensortorch tensortorch added the bug Something isn't working label Apr 10, 2024
@htahir1
Copy link
Contributor

htahir1 commented Aug 22, 2024

@tensortorch sorry for the late response. were you able to fix this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants