Closed tcompa closed 2 months ago
Interesting thoughts. I don't think this is something we need to prioritize for now
Fractal-server only checks that task files exist, but it does not try to load them and check their imports.
It turns out that this is actually useful when the goal is to test task collection (rather than actually running tasks) in a new deployment or with a new configuration. In the current situation, the no-extra task collection will still succeed (and run much faster than the torch-inlcuding one).
Closing for now.
I'm not sure that what I propose below is feasible, but it would be useful.
EDIT: unfortunately I'm afraid this is the same as https://github.com/fractal-analytics-platform/fractal/issues/545, and then not easily feasible. Let's think about other options.
This is a bit of a packaging glitch: installing
fractal-tasks-core
without any extra does not install any of the required dependencies for thefractal_tasks_core.tasks
subpackage, but the subpackage itself is still available. This may lead toOn top of being a bit counterintuitive in itself, this leads to errors like: https://github.com/fractal-analytics-platform/fractal-tasks-core/pull/524#issuecomment-1725915617. Fractal-server only checks that task files exist, but it does not try to load them and check their imports. Thus, at the moment, there is no way for fractal-server to know that something went wrong.
If the
tasks
subpackage were part of the extra, then the task files would not exist and fractal-server would raise an error.