-
Notifications
You must be signed in to change notification settings - Fork 3
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
Expose pinned_package_versions
for task collection
#740
Labels
High Priority
Current Priorities & Blocking Issues
Comments
To do:
|
tcompa
changed the title
Expose
Expose Jun 8, 2023
custom_package_versions
for task collectionpinned_package_versions
for task collection
The simplest test could be a copy of
|
github-project-automation
bot
moved this from TODO
to Done
in Fractal Project Management
Jun 12, 2023
I just tested this in a real example, and it worked as expected:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Quoting from fractal-analytics-platform/fractal-tasks-core#355 (comment)
We explored multiple options with @mfranzon, and we don't see any which makes sense to us via conditional dependencies or something similar. We then propose that:
Since this is very tedious, we also propose the following workaround for doing it automatically (to be included in fractal-server - we can then open issue over there).
The
/api/v1/task/collect/pip/
currently takes this request body:We could add an additional attribute, like
custom_package_versions
. This would be empty by default, and only at UZH we would set it tocustom_package_versions={"torch": "1.12.1"}
. The behavior of the task collection would then be:pip install torch==1.12.1
(wherepip
is replaced by the actual venvpip
that is being used).CAVEAT: this is messing with the package, and thus creating a not-so-clean log of the installation (although we would still include also the additional torch-installation logs). Such an operation is meant to be restricted to very specific cases, where there is an important dependency on hardware or system libraries - things that a regular user should not be using.
IMPORTANT NOTE 1
This workaround cannot bring us out of the versions supported by fractal-tasks-core (for instance). Say that we now require torch>=1.13.0, and then we set
custom_package_versions={"torch": "1.12.1"}
. This task-collection operation will fail, because the installation of the custom package goes conflicts with fractal-tasks-core.IMPORTANT NOTE 2
We should never use this feature to install an additional package. For instance if the
fractal-tasks-core
does not depend onpolars
, and we specifycustom_package_versions={"polars": "1.0"}
, then task collection will fail.MINOR NOTE:
This also fits perfectly with #686, where we would only need to add the same
pip install
line in the script.The text was updated successfully, but these errors were encountered: