Code Monkey home page Code Monkey logo

Comments (6)

chuanyu avatar chuanyu commented on June 30, 2024 4

Thanks for looking into this. Yes, the API docs are out of date, and while we work on updating them, you can instead refer to the docstrings on the functions, either by looking at the code or by using Python's help builtin.

from model-analysis.

HugoDLopes avatar HugoDLopes commented on June 30, 2024 1

Besides, I think I found a bug on

if eval_shared_model.example_weight_key:

I'm getting:

...

/usr/local/lib/python2.7/dist-packages/tensorflow_model_analysis/api/model_eval_lib.pyc in ExtractEvaluateAndWriteResults(examples, eval_shared_model, output_path, display_only_data_location, slice_spec, desired_batch_size, extractors, evaluators, writers, write_config, num_bootstrap_samples)
    566 
    567   example_weight_metric_key = metric_keys.EXAMPLE_COUNT
--> 568   if eval_shared_model.example_weight_key:
    569     example_weight_metric_key = metric_keys.EXAMPLE_WEIGHT
    570 

AttributeError: 'str' object has no attribute 'example_weight_key'

This happened when I called

tfma.run_model_analysis(eval_shared_model='WORKING_DIR/model_analysis',
                        data_location='WORKING_DIR')

I would like to create a mockup with all the emulation of this bug but I find it too difficult to reproduce (sorry). I think that from the last version of tfma to this one you did some changes around example_weight_key and forgot to create some tests for it.

from model-analysis.

chuanyu avatar chuanyu commented on June 30, 2024

Thanks for bringing this to our attention! It looks like we neglected to rebuild the docs before releasing. We will do so shortly.

from model-analysis.

PedroGFonseca avatar PedroGFonseca commented on June 30, 2024

After exploring a bit more, we found that the cause seems to be just deprecated documentation. Here is the contradiction:

  • The documentation says that run_model_analysis
    • has the argument example_weight_key
    • The first argument is model_location
  • The actual implementation of the function
    • does not have the argument example_weight_key
    • The first argument is eval_shared_model, which in turn has an example_weight_key

from model-analysis.

martin-laurent avatar martin-laurent commented on June 30, 2024

Can you please fix this issue, it's been there for three months and it's in the Getting started guide, the very first thing that users read.

from model-analysis.

mdreves avatar mdreves commented on June 30, 2024

Fixed.

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.