question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`mlmd.errors.InternalError` raised when duplicate entries found in metadata store.

See original GitHub issue

System information

  • Have I specified the code to reproduce the issue (Yes, No): No
  • Environment in which the code is executed (e.g., Local(Linux/MacOS/Windows), Interactive Notebook, Google Cloud, etc): AWS with Amazon RDS as the metadata store
  • TensorFlow version: 2.5.2
  • TFX Version: 1.2.0
  • Python version: 3.8
  • Python dependencies (from pip freeze output):
...
ml-metadata==1.2.0
tensorboard==2.8.0
tensorboard-data-server==0.6.1
tensorboard-plugin-wit==1.8.1
tensorflow==2.5.2
tensorflow-data-validation==1.2.0
tensorflow-estimator==2.5.0
tensorflow-hub==0.12.0
tensorflow-metadata==1.2.0
tensorflow-model-analysis==0.33.0
tensorflow-probability==0.13.0
tensorflow-recommenders==0.5.2
tensorflow-serving-api==2.5.3
tensorflow-transform==1.2.0
tfx==1.2.0
tfx-bsl==1.2.0
...

Describe the current behavior

This issue happens when a Transform component tires to insert an entry to the ML Metadata Store (Amazon RDS), if the entry exists, a mlmd.errors.InternalError is raised with errno: 1062, and the error failed to be caught by the code below, which leads to a failure for the Transform component. https://github.com/tensorflow/tfx/blob/d8b226c4c13deec668f60825e3b2d14efdf7ef77/tfx/orchestration/metadata.py#L696

Error:

mlmd.errors.InternalError: mysql_query failed: errno: 1062, error: Duplicate entry '136887-tfx_version-1' for key 'PRIMARY'"

Describe the expected behavior

When Transform component tires to insert an entry to the ML Metadata Store (Amazon RDS), if the entry exists, a mlmd.errors.AlreadyExistsError error should be raised and caught handled by TFX.

Standalone code to reproduce the issue

Name of your Organization (Optional)

Other info / logs

Our current workaround is using the following patch:

701c701,703
<     except mlmd.errors.AlreadyExistsError:
---
>     except (mlmd.errors.AlreadyExistsError, mlmd.errors.InternalError) as e:
>       if isinstance(e, mlmd.errors.InternalError) and "errno: 1062" not in e.message:
>         raise e

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
parham12commented, Jul 12, 2022

Hi there, With Apache Airflow as the orchestrator, I have the same problem when using [MLMD] 1.8.0. A log file related to this issue is attached. dag_id=consumer_complaint_pipeline_airflow_run_id=manual__2022-07-12T10_25_40.659461+00_00_task_id=Transform_attempt=1.log

0reactions
0xleowangcommented, Jul 14, 2022

Unfortunately, we only encountered this error a few times, didn’t find a way to reproduce it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Issues · tensorflow/tfx · GitHub - Pizza Cravings Order Online
mlmd.errors.InternalError raised when duplicate entries found in metadata store. stat:awaiting tensorflower type:bug. #4970 opened on Jun 27 by 0xleowang.
Read more >
tfma.extractors.FeaturesExtractor | TFX - TensorFlow
INPUT_KEY. Any extracts that already exist will be merged with the values from the RecordBatch with the RecordBatch values taking precedence when duplicate...
Read more >
Bugs fixed in each 19.0.0.0.0 Release Update and ... - ANBOB
This document lists the non-security important bugs( NOT ALL bug fixes) fixed in each 19.0.0.0.0 Release Update and Release Update ...
Read more >
11.2.0.4 Patch Set - List of Bug Fixes by Problem Type (Doc ID ...
Bugs fixed in the 11.2.0.4 Patch SetSee Note:880782.1 for Support Status and ... 14505752, Duplicate entries when processing large XML data.
Read more >
Oracle Messages 'Cause and Action' - Software Download
ORA-00100, 00000, "no data found" Cause: An application made reference to unknown or ... 159 Oracle*XA errors / ORA-00150, 00000, "duplicate transaction ID" ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found