Comments (4)
In general, this sounds like an issue where the custom module is not available on the Beam worker, even though it is available in your main program (where the Beam pipeline is constructed). My first thought is to suggest you try setting the module_file
parameter in the Evaluator component with an absolute path to your module file. This will package the module_file
and distribute it to the Beam workers.
A couple clarifications which might help narrow things down:
- How are you invoking the Evaluator component? Are you running it in a TFX pipeline? Ideally we could find a portable way to reproduce this issue.
- Was this custom metric setup previously working, and it broke with TFMA version 0.22.2? Or has this never worked?
- Does your real metric module name (not what I assume is the placehorlder,
my.module_file.path.metrics
) include the literal,tf.keras.metrics
? If so, then it might have been affected by the change you linked, though this seems pretty unlikely.
from model-analysis.
Have some updates here -
- We publish the custom metrics code in an
extra_package
that is sent to beam workers, and can confirm this package has the code, and that from logs, the workers install that extra_package. - The setup was not previously working, it was a first attempt at implementing custom metrics
- It does not include the literal
tf.keras.metrics
which is why I thought it wouldnt be affected
That said, we have managed to update the code to use TFX 0.27 (TFMA 0.27) and magically the code seems to work 🤷 (no other changes to the code related to the evaluator component, custom metrics code or packaging thereof) I have no idea what change might have caused the fix but perhaps we can close the issue.
from model-analysis.
Well, glad it's fixed. It would be nice to understand the root cause, but it's probably not a high priority unless this issue reappears for others. Thanks for taking the time to report the issue and follow up.
from model-analysis.
Closing this based on above comment trace,Thanks.
from model-analysis.
Related Issues (20)
- AttributeError: partially initialized module error, test.py HOT 2
- Incorrect Documentation for MetricConfig
- Custom multilabel Keras metrics: dynamically initialize weight shape HOT 1
- Fairness indicator metrics do not show up HOT 5
- Validation bug when using feature values as slicing specs HOT 2
- No longer compatible with Dataflow runner v1 after v0.29
- Renaming Custom Layer breaks TFMA Evaluator HOT 6
- Error in merge_accumulators when using keras metrics on dataflow HOT 3
- TFMA analyze_raw_data function support with MultiClassConfusionMatrixPlot HOT 3
- Analytics HOT 1
- Breaking changes: tfma.metrics.MetricComputation `preprocessor` argument changed from accepting beam DoFn to `preprocessors` accepting a list of `Preprocessor` HOT 1
- Move to numpy >=1.20 because <1.20 is difficult to build on Apple Silicon HOT 4
- TFMA on Flink does not seems to be parallelizing work. HOT 5
- only integer values should be passed to num_instances metric. HOT 3
- Render_plot is failing HOT 2
- Feat: Have ability to return the HTML rather than creating the plots HOT 1
- CVE in Pyarrow dependency HOT 1
- CNN HOT 2
- pip install tensorflow-model-analysis fails on WSL2 on Windows 11 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from model-analysis.