-
Notifications
You must be signed in to change notification settings - Fork 19.5k
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
Generate public API in keras/api
folder.
#19510
Conversation
9f252e5
to
f374e99
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #19510 +/- ##
==========================================
- Coverage 76.40% 69.22% -7.18%
==========================================
Files 370 497 +127
Lines 41754 44211 +2457
Branches 8161 8206 +45
==========================================
- Hits 31902 30605 -1297
- Misses 8131 11790 +3659
- Partials 1721 1816 +95
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
a72b4c7
to
529908f
Compare
keras/api
folder.
5a0a998
to
686bd62
Compare
Thanks for the PR!
This is because previously the "view" of the tests was the We also need to run some integration checks with |
923e994
to
3e3e809
Compare
Closing this PR and incorporated the changes in #19530 |
keras/src
folder.keras/api
folder and imports them inkeras/__init__.py
../shell/api_gen.sh
with the PR and there are no changes to API.Now, Keras can be installed via
pip install -e .
. Users can continue to usepython pip_build.py
which builds the wheel in virtual env and installs it.To generate public API, run -
./shell/api_gen.sh
@fchollet - One test failing in TensorFlow backend in CPU and GPU. This is because it expects
keras.Functional
API, but that doesn't exist in the API generated. It only exists inkeras.src.Functional
. This is true when we dopip_build.py
as well and generate pip package. So need your help to sort this out.Differences with Existing Keras Package Install:
pip install git+https://github.com/sampathweb/keras.git@api-gen3
Note that we hide
src
andapi
from intellisense (inkeras/__init__.py
), but they are available inkeras.src
(for private symbols) andkeras.api
(which is same askeras.
symbols).What we currently have for pip install in PyPi, the symbols match except that
src
,_tf_keras
are listed here, but hidden in the new method above (via all) but still available. -Note that in either dirs,
keras.Functional
is not exposed directly, but is available in Keras Master branch GitHubkeras/__init__.py
and how the test for TensorFlow that's failing was trying to access it. Can we change the test to another way that would also pass in installed Keras public APIs?