Code Monkey home page Code Monkey logo

Comments (4)

embr avatar embr commented on July 18, 2024

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.

rclough avatar rclough commented on July 18, 2024

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.

embr avatar embr commented on July 18, 2024

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.

arghyaganguly avatar arghyaganguly commented on July 18, 2024

Closing this based on above comment trace,Thanks.

from model-analysis.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.