Ship calibration_plot.py in the Galaxy tool bundle - #178
Conversation
plotly_plots.py imports calibration_plot (expected_calibration_error) but calibration_plot.py was missing from <required_files>, so Galaxy did not stage it into the job directory and the tool failed at import with ModuleNotFoundError: No module named 'calibration_plot'. Add the include. Verified every local module imported by shipped code is now declared.
qchiujunhao
left a comment
There was a problem hiding this comment.
Approving the scoped Image Learner packaging fix. The added required-file declaration is correct, and the focused Image Learner suite passes (31 tests).
Non-blocking follow-up: calibration_plot.py is also imported at module load time by tools/multimodallearner/plot_logic.py and tools/tabularlearner/pycaret_classification.py, but it is not yet listed in the corresponding multimodal_learner.xml and tabular_learner.xml <required_files> sections. Please add the same <include path="calibration_plot.py" /> declaration there in this PR or a follow-up. A recursive audit found no other missing local Python modules in the four learner tool definitions.
Superseded by the subsequent approval; the remaining packaging note is non-blocking.
Same packaging gap as the image learner: pycaret_classification.py (tabular, via pycaret_train) and plot_logic.py (multimodal) both import calibration_plot.expected_calibration_error, but calibration_plot.py was absent from <required_files>, so Galaxy failed at import with ModuleNotFoundError: No module named 'calibration_plot'. Audited all four tool XMLs by resolving the transitive local-import closure from each entry point: tabular_learner, pycaret_predict, image_learner and multimodal_learner now declare every local module they import (no missing, no ghost includes).
Updating the <required_files> to fix the following problem on usegalaxy.org:
Traceback (most recent call last): File "/jetstream2/scratch/main/jobs/78675941/tool_files/image_learner_cli.py", line 9, in <module> from image_workflow import ImageLearnerCLI File "/jetstream2/scratch/main/jobs/78675941/tool_files/image_workflow.py", line 23, in <module> from ludwig_backend import Backend File "/jetstream2/scratch/main/jobs/78675941/tool_files/ludwig_backend.py", line 42, in <module> from plotly_plots import ( File "/jetstream2/scratch/main/jobs/78675941/tool_files/plotly_plots.py", line 9, in <module> from calibration_plot import expected_calibration_error ModuleNotFoundError: No module named 'calibration_plot'