keras-team / keras

Deep Learning for humans
http://keras.io/
Apache License 2.0
61.06k stars 19.35k forks source link

add packaging requirement #19659

Closed albertaillet closed 2 weeks ago

albertaillet commented 2 weeks ago

Motivation

When installing keras with pip install -U keras the packaging package is not installed. Its parsing features are however used with

from packaging.version import parse

in keras/src/backend/torch/trainer.py and keras/src/utils/torch_utils.py, which leads to a ModuleNotFoundError.

Changes made

This PR adds the packaging package to requirements-common.txt and setup.py.

codecov-commenter commented 2 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 73.48%. Comparing base (e4f5092) to head (2c4a0b0).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #19659 +/- ## ========================================== - Coverage 78.38% 73.48% -4.91% ========================================== Files 498 498 Lines 45517 45517 Branches 8391 8391 ========================================== - Hits 35680 33448 -2232 - Misses 8100 10409 +2309 + Partials 1737 1660 -77 ``` | [Flag](https://app.codecov.io/gh/keras-team/keras/pull/19659/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=keras-team) | Coverage Δ | | |---|---|---| | [keras](https://app.codecov.io/gh/keras-team/keras/pull/19659/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=keras-team) | `73.36% <ø> (-4.88%)` | :arrow_down: | | [keras-jax](https://app.codecov.io/gh/keras-team/keras/pull/19659/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=keras-team) | `?` | | | [keras-numpy](https://app.codecov.io/gh/keras-team/keras/pull/19659/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=keras-team) | `56.34% <ø> (ø)` | | | [keras-tensorflow](https://app.codecov.io/gh/keras-team/keras/pull/19659/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=keras-team) | `63.38% <ø> (+0.01%)` | :arrow_up: | | [keras-torch](https://app.codecov.io/gh/keras-team/keras/pull/19659/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=keras-team) | `62.03% <ø> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=keras-team#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.