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

Use options object to manage python version installation options #664

Closed
njtierney opened this issue Aug 5, 2024 · 3 comments · Fixed by #674
Closed

Use options object to manage python version installation options #664

njtierney opened this issue Aug 5, 2024 · 3 comments · Fixed by #674

Comments

@njtierney
Copy link
Collaborator

So the user will specify something like:

greta_python_deps <- function(tf_version = "2.15.0",
                              tfp_version = "0.23.0",
                              keras_version = "2.15.0",
                              versions = c("exact", "gte"),
                              py_version = "3.9"){
  structure(
    list(
      tf_version = tf_version,
      tfp_version = tfp_version,
      keras_version = keras_version,
      versions = versions
    ),
    class = "greta_python_deps"
  )
}

We could even potentially identify known cases where the sets of these installations will not work. E.g., we might know that python version 3.7 is no longer supported. Or that certain versions of TF/TFP aren't compatible. These could error by default, and we could allow override by specifying an environment variable.

https://design.tidyverse.org/argument-clutter.html

@njtierney
Copy link
Collaborator Author

Instead of a versions arg, which would work with an internal switch pattern, I think it's better to assume exact versions.

While we could add functionality for >= I think it might end up meaning we gain less control over what is installed.

@njtierney
Copy link
Collaborator Author

As part of this option we can check for bad combinations of Python version + TF + TFP.

https://www.tensorflow.org/install/source#tested_build_configurations

@njtierney
Copy link
Collaborator Author

njtierney commented Aug 6, 2024

I think this checking for bad combinations should be its own issue in #638

njtierney added a commit to njtierney/greta that referenced this issue Aug 6, 2024
…greta-dev#523)

* Added installation deps object, `greta_python_deps()` to help simplify specifying package versions (greta-dev#664)
* removed `method` and `conda` arguments from `install_greta_deps()` as they
  were not used.
* removed `manual` option in `install_greta_deps()`
* added default 5 minute timer to installation processes
@njtierney njtierney moved this from Weekly Todo to In Progress in {greta} CRAN 0.5.0 release Aug 6, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in {greta} CRAN 0.5.0 release Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

1 participant