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

Remove package's tensorflow dependency or loosen version requirements #17

Open
cxgoogle opened this issue Jul 28, 2023 · 1 comment
Open

Comments

@cxgoogle
Copy link
Collaborator

Removing the dep slims the package down, making it easier to install, and easier for us package maintainers (fewer bugs/conflicts to deal with).

We already decided that TF model code can go purely in the notebooks, and not be part of the package. The current remaining purposes of TF in the package that prevent us from moving the install to the notebooks are:

  • Reading tfrecord files
  • Generating serialized tfrecords required for the embeddings API

Benefits:

  • Pytorch users will be able to install the package without needing to install both TF and Pytorch in the same environment.
  • TF users may want to run analysis with a different version than the ones required by this package. Similarly, we could consider loosening the version requirements.
  • Colab - once again, the TF version may clash with the existing version, requiring uninstall, etc.

Side note: we also depend on the tensorflow-models package (only in the notebooks) and its version must match the tensorflow version. Currently, we only use tf-models for the optimizer. If the demo notebooks could use an optimizer built into TF, that would remove the need for tf-models. But this isn't an important issue since the package itself doesn't require tf-models.

@cxgoogle
Copy link
Collaborator Author

Regarding tf-models, there is one annoying thing: In 2.13 they changed the optimizer module names, from tfm.optimization.lars_optimizer.LARS to tfm.optimization.lars.LARS`.

This is why I updated tf and tf-models to >=2.13.0 in PR #14, to get ahead of the potentially breaking change. But the actual package itself should work with a wider range of TF versions. 2.10 was the initial version specified in this package.

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

No branches or pull requests

1 participant