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

Deprecate ModelCardGenerator component #248

Merged

Conversation

codesue
Copy link
Collaborator

@codesue codesue commented Nov 17, 2022

What does this pull request do?

  • Removes the ModelCardGenerator component and the tfx dependency
  • Updates documentation and adds a notice that the component is moving to tfx-addons
  • Bumps the upper limits of tf-related dependencies so that model-card-toolkit will be compatible with newer versions of tfx

This change will be part of version 2.0.0.

Fixes #247, #202, #185, #93

How did you test this change?

Installed with pip install -e ".[test]". Ran all tests with find . -name '*_test.py' | xargs -I {} python {}.
See this gist for pip freeze and test output.

Note: The test added in this PR looks like it takes a long time to run, but the expensive part of that is importing model_card_tookit the first time. Running time on model_card_toolkit/__init__.py takes 7.27s user 1.55s system 90% cpu 9.727 total compared to 0.06s user 0.03s system 55% cpu 0.156 total when running the code for the added test on its own.

How did you document this change?

  • Updated guides and READMEs.
  • Added a notice as a NotImplementedError that's raised when importing from the removed module.

Before submitting

Before submitting a pull request, please be sure to do the following:

  • Read the How to Contribute guide if this is your first contribution.
  • Open an issue or discussion topic to discuss this change.
  • Write new tests if applicable.
  • Update documentation if applicable.

Co-authored-by: Suzen Fylke codesue@users.noreply.github.com
Co-authored-by: Hannes Hapke hanneshapke@users.noreply.github.com

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

hanneshapke
hanneshapke previously approved these changes Nov 17, 2022
Co-authored-by: Suzen Fylke <codesue@users.noreply.github.com>
Co-authored-by: Hannes Hapke <hanneshapke@users.noreply.github.com>
hanneshapke
hanneshapke previously approved these changes Nov 18, 2022
@codesue
Copy link
Collaborator Author

codesue commented Nov 28, 2022

Hi @casassg and @ahmed-bd, would you please review this PR when you get a chance. It's a larger and breaking change, so I'd appreciate more feedback or approvals. 🙏

casassg
casassg previously approved these changes Nov 29, 2022
Copy link
Member

@casassg casassg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

overall lgtm, an idea here may be to try to import the component from tfx-addons:

try:
  from tfx-addons.model_card_generator import ModelCardGenerator
except ImportError:
  ModelCardGenerator = None

This way users can optionally install tfx-addons and still continue using the component without breakage. it's a bit complex to be fair, so not 100% sure about it, but may be worth a shot

README.md Outdated Show resolved Hide resolved
model_card_toolkit/tfx/__init__.py Outdated Show resolved Hide resolved
@codesue
Copy link
Collaborator Author

codesue commented Nov 30, 2022

Apparently this branch was set up to automatically dismiss PR approvals when new commits are pushed. Just changed it to not do that. 😅

@hanneshapke
Copy link
Collaborator

@codesue Do you mind keeping the dismissed stale reviews setting? It helps with tracking changes and avoids last-minute changes.

@codesue
Copy link
Collaborator Author

codesue commented Dec 1, 2022

@codesue Do you mind keeping the dismissed stale reviews setting? It helps with tracking changes and avoids last-minute changes.

@hanneshapke I changed it back.

hanneshapke
hanneshapke previously approved these changes Dec 2, 2022
@codesue codesue merged commit eec432b into tensorflow:master Dec 3, 2022
@codesue codesue deleted the codesue/237-deprecate-tfx-component branch December 3, 2022 00:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants