Skip to content

Add py-tf-keras package, upgrade TFP#43688

Merged
adamjstewart merged 81 commits intospack:developfrom
jonas-eschle:add_tfkeras_tfp
Apr 1, 2025
Merged

Add py-tf-keras package, upgrade TFP#43688
adamjstewart merged 81 commits intospack:developfrom
jonas-eschle:add_tfkeras_tfp

Conversation

@jonas-eschle
Copy link
Copy Markdown
Contributor

Upgrade TensorFlow-Probability, which now requires (see release notes) a new package, tf-keras, which is effectively the 2.x version of previous keras.

Added py-tf-keras package

@jonas-eschle

This comment was marked as outdated.

@spackbot-app

This comment was marked as resolved.

@jonas-eschle
Copy link
Copy Markdown
Contributor Author

jonas-eschle commented Apr 16, 2024

@aweits, I'll gladly add you (or you do it yourself) to the maintainers too, as you're already on TFP etc

@tldahlgren tldahlgren changed the title enh: add tf-keras package, upgrade TFP enh: add py-tf-keras package, upgrade TFP Apr 17, 2024
tldahlgren

This comment was marked as outdated.

@tldahlgren
Copy link
Copy Markdown
Contributor

@adamjstewart Are you interested in reviewing the new py-tf-keras package in this PR?

@tldahlgren
Copy link
Copy Markdown
Contributor

@aweits Are you okay with being added as a maintainer on the py-tensorflow-probability package?

@tldahlgren tldahlgren self-assigned this Apr 17, 2024
Copy link
Copy Markdown
Member

@adamjstewart adamjstewart left a comment

Choose a reason for hiding this comment

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

A lot of this PR looks like it was simply copied from the py-keras package recipe, but I don't think it actually works.

@jonas-eschle
Copy link
Copy Markdown
Contributor Author

A lot of this PR looks like it was simply copied from the py-keras package recipe, but I don't think it actually works.

It pretty much was, yes. Is there any reliable way of testing spack packages? I didn't find any image or something, as mentioned, I barely ever succeed, whether in spack envs or outside and whether metal or clean image, it almost always manages to fail at some point
apologies if this was an oversight of mine, I just didn't find anything suitable in the documentation

@adamjstewart
Copy link
Copy Markdown
Member

Most Spack packages build for me. Can you try building locally? If you encounter any issue, open an issue and we can get it fixed.

adamjstewart
adamjstewart previously approved these changes Apr 19, 2024
Copy link
Copy Markdown
Member

@adamjstewart adamjstewart left a comment

Choose a reason for hiding this comment

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

LGTM. Did it build successfully?

@jonas-eschle
Copy link
Copy Markdown
Contributor Author

jonas-eschle commented Apr 20, 2024

Still trying to build, I'll ping once it worked out

@jonas-eschle
Copy link
Copy Markdown
Contributor Author

It fails, as layers/experimental doesn't seem to be added properly to the BUILD script in tf-keras: keras-team/tf-keras#776

@adamjstewart
Copy link
Copy Markdown
Member

At least you made it all the way to the final package!

@jonas-eschle
Copy link
Copy Markdown
Contributor Author

At least you made it all the way to the final package!

yes, managed! Seems like past issues have been fixed meanwhile, good to see that!

@tldahlgren

This comment was marked as outdated.

@tldahlgren
Copy link
Copy Markdown
Contributor

Is this PR ready to merge now?

@jonas-eschle
Copy link
Copy Markdown
Contributor Author

@adamjstewart I think this is finally available! It builds, I've strongly simplified the build

@adamjstewart adamjstewart changed the title WIP: add py-tf-keras package, upgrade TFP Add py-tf-keras package, upgrade TFP Mar 31, 2025
Copy link
Copy Markdown
Member

@adamjstewart adamjstewart left a comment

Choose a reason for hiding this comment

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

I'm trusting you on the py-tf-keras package since it doesn't use a standard way to document its dependencies.

@jonas-eschle
Copy link
Copy Markdown
Contributor Author

@spackbot fix style

@spackbot-app
Copy link
Copy Markdown

spackbot-app bot commented Apr 1, 2025

Let me see if I can fix that for you!

@spackbot-app
Copy link
Copy Markdown

spackbot-app bot commented Apr 1, 2025

I was able to run spack style --fix for you!

spack style --fix
==> Running style checks on spack
  selected: import, isort, black, flake8, mypy
==> Modified files
  var/spack/repos/builtin/packages/py-tensorflow-probability/package.py
  var/spack/repos/builtin/packages/py-tf-keras/package.py
==> Running import checks
  import checks were clean
==> Running isort checks
Fixing /tmp/tmpz4n8ccze/spack/var/spack/repos/builtin/packages/py-tf-keras/package.py
  isort checks were clean
==> Running black checks
All done! ✨ 🍰 ✨
2 files left unchanged.
  black checks were clean
==> Running flake8 checks
var/spack/repos/builtin/packages/py-tf-keras/package.py:5: [F401] 'spack.package.*' imported but unused
  flake8 found errors
==> Running mypy checks
Success: no issues found in 632 source files
  mypy checks were clean
Keep in mind that I cannot fix your flake8 or mypy errors, so if you have any you'll need to fix them and update the pull request. If I was able to push to your branch, if you make further changes you will need to pull from your updated branch before pushing again.

I've updated the branch with style fixes.

@adamjstewart adamjstewart merged commit 91b3afa into spack:develop Apr 1, 2025
17 checks passed
climbfuji pushed a commit to climbfuji/spack that referenced this pull request Apr 17, 2025
* enh: add tf-keras package, upgrade TFP

* chore:  remove legacy deps

* chore:  fix style

* chore:  fix style

* fix: url

* fix: use jax, tensorflow instead of py-jax, py-tensorflow

* fix: remove typo

* Update var/spack/repos/builtin/packages/py-tensorflow-probability/package.py

Co-authored-by: Adam J. Stewart <[email protected]>

* fix: typos

* fix: swap version

* fix: typos

* fix: typos

* fix: typos

* chore: use f strings

* enh: move tf-keras to pypi

* [@spackbot] updating style on behalf of jonas-eschle

* fix: t

* enh: add tf-keras package, upgrade TFP

* chore:  remove legacy deps

* chore:  fix style

* chore:  fix style

* fix: url

* fix: use jax, tensorflow instead of py-jax, py-tensorflow

* fix: remove typo

* Update var/spack/repos/builtin/packages/py-tensorflow-probability/package.py

Co-authored-by: Adam J. Stewart <[email protected]>

* fix: typos

* fix: swap version

* fix: typos

* fix: typos

* fix: typos

* chore: use f strings

* enh: move tf-keras to pypi

* [@spackbot] updating style on behalf of jonas-eschle

* enh: move tf-keras to pypi

* enh: move back to releases to make it work, actually

* enh: move back to releases to make it work, actually

* fix:change back to tar...

* Fix concretisation: py-tf-keras only has 2.17, not 2.16, fix checksum

* enh: add TFP 0.25

* enh: add tf-keras 2.18

* chore: fix style

* fix: remove patch

* maybe fix license

* Update var/spack/repos/builtin/packages/py-tf-keras/package.py

Co-authored-by: Adam J. Stewart <[email protected]>

* fix:  pipargs global?

* Update var/spack/repos/builtin/packages/py-tf-keras/package.py

Co-authored-by: Wouter Deconinck <[email protected]>

* chore: fix formatting

* chore: fix formatting again

* fix:  pathes in spack

* fix:  typo

* fix:  typo

* use github package

* use pip install

* fix typo

* fix typo

* comment 2.19 out

* fix typo

* fix typo

* fix typo

* chore: remove unused patch file

* chore: cleanup

* chore: add comment about TF version

* chore: remove unused Bazel, cleanup imports

* [@spackbot] updating style on behalf of jonas-eschle

* chore: add star import, degrading readability

---------

Co-authored-by: Adam J. Stewart <[email protected]>
Co-authored-by: jonas-eschle <[email protected]>
Co-authored-by: Bernhard Kaindl <[email protected]>
Co-authored-by: Bernhard Kaindl <[email protected]>
Co-authored-by: Wouter Deconinck <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants