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

Missing _make_exception() function in ml-metadata 1.14, causing TFX pipeline execution issues #6916

Closed
sawanjr opened this issue Sep 15, 2024 · 4 comments

Comments

@sawanjr
Copy link

sawanjr commented Sep 15, 2024

I encountered an issue while running TFX version 1.14 on a Windows platform, which depends on ml-metadata version 1.14. During the execution of my pipeline, I faced the following error:

ml_metadata.errors.UnimplementedError: MLMD Filtering is not supported in Windows platform since ZetaSQL currently does not compile on Windows.

Upon investigating, I found that the error is raised by the _make_exception() function, which is missing in the ml-metadata 1.14 source code. However, this function is present in the official TFX GitHub repository, specifically in the metadata_store.py file. Here's the missing function:

def _make_exception(msg, error_code):
"""Makes an exception with MLMD error code.

Args:
msg: Error message.
error_code: MLMD error code.

Returns:
An exception.
"""

try:
exc_type = errors.exception_type_from_error_code(error_code)
return exc_type(msg)
except KeyError:
return errors.UnknownError(msg)

This discrepancy causes the TFX pipeline to fail when running on Windows, since the current ml-metadata 1.14 package lacks this necessary function.

Steps to reproduce:

Use TFX 1.14 with ml-metadata 1.14 on Windows.
Run a TFX pipeline that involves the ImportExampleGen component.
Observe the error raised during pipeline execution.
Proposed Solution: Please include the missing _make_exception() function in the ml-metadata 1.14 package, or update the version of ml-metadata bundled with TFX 1.14 to include this function.

@janasangeetha janasangeetha self-assigned this Sep 25, 2024
@janasangeetha
Copy link
Contributor

Hi @sawanjr,
The code has been updated in version 1.15.0 , but please note that the latest version does not support Windows. You can install WSL on windows following this guide and set up a conda environment inside your WSL instance. Then you can install TFX and run the pipeline.
If you have any questions or need assistance, feel free to ask!
Thank you!

Copy link
Contributor

github-actions bot commented Oct 3, 2024

This issue has been marked stale because it has no recent activity since 7 days. It will be closed if no further activity occurs. Thank you.

@github-actions github-actions bot added the stale label Oct 3, 2024
Copy link
Contributor

This issue was closed due to lack of activity after being marked stale for past 7 days.

Copy link
Contributor

Are you satisfied with the resolution of your issue?
Yes
No

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

No branches or pull requests

2 participants