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

CI updates (tox + Github workflows) #60

Merged
merged 8 commits into from
Nov 3, 2022
Merged

Conversation

cofri
Copy link
Collaborator

@cofri cofri commented Sep 30, 2022

Some improvements have been made in the continuous integration pipeline:

  • tox:
    • New environments for unit testing with supported TensorFlow versions (from TF 2.2 to 2.10)
    • Support of Python 3.9 and 3.10
    • Remove support of Python 3.6 (this version is not maintained anymore)
  • Github workflows:
    • actions for unit testing now perform on multiple TensorFlow versions: py3.7 + TF2.3, py3.9 + TF2.7, py3.10 + TF-latest
    • tests are done on PR, push on master and develop, and on a weekly basis on master
    • versions of actions (checkout and setup-python) are updated

Moreover, two changes were added:

  • deel-lip package now supports TensorFlow >= 2.2 (instead of 2.0 previously). There is a bug in TensorFlow 2.0 and 2.1 when loading and saving custom losses or metrics.
  • a VERSION file was introduced to have the version number stored in a single place. Moreover, the version can be accessed with deel.lip.__version__.

@cofri cofri force-pushed the feat/ci_multiple_tf_versions branch 2 times, most recently from d35485d to b978d9e Compare September 30, 2022 14:55
@cofri cofri force-pushed the feat/ci_multiple_tf_versions branch 7 times, most recently from 1b8255b to 5e470b0 Compare October 27, 2022 10:22
@cofri cofri marked this pull request as ready for review October 27, 2022 10:29
@cofri cofri requested a review from thib-s October 27, 2022 10:29
@cofri cofri changed the title DRAFT: CI updates (tox + Github workflows) CI updates (tox + Github workflows) Nov 2, 2022
cofri added 8 commits November 3, 2022 09:55
Because of bugs in TensorFlow 2.0 and 2.1 when saving/loading
custom losses or metrics, these versions are not supported anymore.
deel-lip now supports TensorFlow 2.2 and higher.

Moreover, we tell pip that Python versions 3.9 and 3.10 are supported.
Since Python 3.6 is not maintained anymore, we also removed it from
the classifiers.
The tox configuration file is updated to add environments with different
Python and TensorFlow versions. This allows to run unit tests with these
environments and ensure that the library is stable across Python and TF
versions.

Note that TensorFlow 2.2 version requires an older version for protobuf
package.
Since a unit test uses a Keras gelu activation which was introduced in
Tensorflow 2.4, a check is added.
Since the tox configuration file now contains a large number of environments
for multiple Python and TensorFlow versions, the targets "make test" and
"make test-disable-gpu" now runs only a small subset of the tests. But these
tests are representative of the different TF versions.
The current versions were deprecated due to an update on Github workflows.
The latest versions are now used for actions/checkout and actions/setup-python
The Github workflows for unit testing are extended to test different Python
and TensorFlow versions. Three tests are performed on Github CI with the
following combinations:
- Python 3.7 and TensorFlow 2.3
- Python 3.9 and TensorFlow 2.7
- Python 3.10 and TensorFlow latest (2.10 as of october 2022)
The Github workflows for linting and testing are done when:
- a pull request is open (and updated)
- pushing on master and develop

Moreover, the unit tests are also performed:
- every Sunday at 2am on master (i.e. the base branch)
The aim of this commit is to have the package version at a single place, and
not across multiple files.

The VERSION file contains the version number. It is now the only place where
it is set. The setup.py and the Sphinx conf.py read this file.
It is now possible to get the version number directly from the package:
  import deel.lip
  print(deel.lip.__version__)

Note that to add non-Python files to the sdist package, it is required to add
`include_package_data=True` in setup.py and a MANIFEST.in file containing the
non-Python files to add in package.
@cofri cofri force-pushed the feat/ci_multiple_tf_versions branch from 5e470b0 to 341bae2 Compare November 3, 2022 08:55
Copy link
Member

@thib-s thib-s left a comment

Choose a reason for hiding this comment

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

LGTM !

@thib-s thib-s merged commit b4210f7 into develop Nov 3, 2022
@thib-s thib-s deleted the feat/ci_multiple_tf_versions branch November 3, 2022 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants