Repository navigation
fix(ci): unbreak master CI (pyarrow 26, torch weights_only, pandas 3, leptonai 0.47) - #3477
Merged
Merged
Conversation
pyarrow 26 requires numpy>=2, which tensorflow<=2.15.1 forbids, so every job that imports pyarrow dies at collection time. torch>=2.6 defaults torch.load(weights_only=True), which refuses to unpickle nn.Module objects. Pass weights_only=False when the kwarg exists (torch<1.13 does not have it). Signed-off-by: Kevin Su <pingsutw@apache.org>
Tensors and checkpoints (state dicts + plain values) load fine under torch's safe default, so keep it there and only opt out where a whole nn.Module is pickled. Signed-off-by: Kevin Su <pingsutw@apache.org>
pingsutw
requested review from
cosmicbboy,
davidmirror-ops,
kumare3,
machichima,
samhita-alla and
wild-endeavor
as code owners
October 23, 2026 17:02
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3477 +/- ##
===========================================
- Coverage 80.83% 47.77% -33.06%
===========================================
Files 217 217
Lines 22960 22963 +3
Branches 3038 3037 -1
===========================================
- Hits 18559 10970 -7589
- Misses 3547 11385 +7838
+ Partials 854 608 -246 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
pandas 3.x wheels need numpy>=2.0.2 at import time, but CI installs numpy<2 for the onnx, sqlalchemy and pandera plugins (and whylogs pins it itself). Pin pandas<3 in those plugins' dev requirements, following the existing scipy<1.18 workaround in onnx-scikitlearn. leptonai 0.47 removed leptonai.api.v1, which the lepton connector imports. Signed-off-by: Kevin Su <pingsutw@apache.org>
AdilFayyaz
approved these changes
Oct 23, 2026
fellhorn
pushed a commit
to fellhorn/flytekit
that referenced
this pull request
Oct 25, 2026
- pyproject.toml: requires-python ">=3.10,<3.14", add the 3.13 classifier; regenerate uv.lock accordingly. - PythonVersion enum and default image prefixes: add 3.13 in flytekit core, the sqlalchemy plugin and the openai batch plugin. Without it, DefaultImages.find_image_for() raises "(3, 13) is not a valid PythonVersion" on 3.13. - CI (pythonbuild.yml): run 3.13 on pull requests and in the nightly matrix, enable the extras (tensorflow/pytorch) tests on 3.13, exclude pandas<2 and plugins whose dependencies do not support 3.13 yet. - dev-requirements.in: tensorflow>=2.21 and torch>=2.6 on 3.13; lift the protobuf<5 dev pin on 3.13 only (tensorflow 2.21 needs protobuf>=6, and the issue behind the pin, flyteorg/flyte#5448, was fixed upstream). - Publish py3.13 images in pythonpublish.yml and build_image.yml. - pytorch extras: torch>=2.6 defaults torch.load(weights_only=True), which cannot load the whole nn.Module / checkpoint objects flytekit stores. Pass weights_only=False where the keyword exists. This is required for the extras tests on 3.13 and already fails in the nightly 3.11 run. Closes flyteorg/flyte#6993 Rebased onto flyteorg#3477: its pytorch weights_only handling replaces the one from this commit. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: bochinski <30434375+bochinski@users.noreply.github.com> (cherry picked from commit 605e0b1) Signed-off-by: Dennis Keck <26092524+fellhorn@users.noreply.github.com>
2 of 3 tasks
fellhorn
pushed a commit
to fellhorn/flytekit
that referenced
this pull request
Oct 25, 2026
- pyproject.toml: requires-python ">=3.10,<3.14", add the 3.13 classifier; regenerate uv.lock accordingly. - PythonVersion enum and default image prefixes: add 3.13 in flytekit core, the sqlalchemy plugin and the openai batch plugin. Without it, DefaultImages.find_image_for() raises "(3, 13) is not a valid PythonVersion" on 3.13. - CI (pythonbuild.yml): run 3.13 on pull requests and in the nightly matrix, enable the extras (tensorflow/pytorch) tests on 3.13, exclude pandas<2 and plugins whose dependencies do not support 3.13 yet. - dev-requirements.in: tensorflow>=2.21 and torch>=2.6 on 3.13; lift the protobuf<5 dev pin on 3.13 only (tensorflow 2.21 needs protobuf>=6, and the issue behind the pin, flyteorg/flyte#5448, was fixed upstream). - Publish py3.13 images in pythonpublish.yml and build_image.yml. - pytorch extras: torch>=2.6 defaults torch.load(weights_only=True), which cannot load the whole nn.Module / checkpoint objects flytekit stores. Pass weights_only=False where the keyword exists. This is required for the extras tests on 3.13 and already fails in the nightly 3.11 run. Closes flyteorg/flyte#6993 Rebased onto flyteorg#3477: its pytorch weights_only handling replaces the one from this commit. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: bochinski <30434375+bochinski@users.noreply.github.com> (cherry picked from commit 605e0b1) Signed-off-by: Dennis Keck <26092524+fellhorn@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tracking issue
N/A — master CI has been red since the last green run on 2026-10-02 (run 37051324786) due to upstream releases, not repo changes.
Why are the changes needed?
Every
Buildrun on master currently fails for several independent upstream reasons:dev-requirements.inleaves pyarrow unpinned, whiletensorflow<=2.15.1forces numpy 1.26.4. Thetest-serialization,build-with-pandasand bothintegrationjobs die at collection time with:torch.load(weights_only=True), which refuses to unpicklenn.Moduleobjects. All fourbuild-with-extrasjobs failtest_native.py::test_wfandtest_transformations.py::test_to_python_value_and_literal[...PyTorchModule...]with:build-pluginsjob installsnumpy<2.0.0for the onnx, sqlalchemy and pandera plugins (and whylogs pinsnumpy<2.0itself).build-plugins (3.12, ...)for whylogs, pandera, onnx-scikitlearn fail with:'_LazyModule' object has no attribute 'DataFrame'because pandas is lazily imported.leptonai.api.v1, which the dgxc-lepton connector imports:What changes were proposed in this pull request?
dev-requirements.in: pinpyarrow<26with a comment explaining the tensorflow/numpy conflict. Resolution now picks pyarrow 25.0.1 + numpy 1.26.4 + tensorflow 2.15.1.flytekit/extras/pytorch/native.py: add aTORCH_LOAD_KWARGSclass attribute onPyTorchTypeTransformer(empty by default) that is forwarded totorch.load. OnlyPyTorchModuleTransformersets{"weights_only": False}, since it pickles a wholenn.Module. The kwarg is only passed when torch supports it (torch<1.13 on py3.10 does not).PyTorchTensorTransformerandPyTorchCheckpointTransformerkeep torch's safe default: tensors, state dicts and plain hyperparameter values all load fine withweights_only=True. This restores the pre-torch-2.6 behavior for the module transformer only.plugins/flytekit-{whylogs,pandera,sqlalchemy,onnx-scikitlearn}/dev-requirements.in: pinpandas<3, following the existingscipy<1.18workaround in onnx-scikitlearn for the same CI numpy<2 forcing.plugins/flytekit-dgxc-lepton/setup.py: pinleptonai<0.47.Follow-up worth considering (not done here, since it is a CI config change): the
numpy<2.0.0forcing inpythonbuild.ymlis commented as an onnx workaround but also applies to sqlalchemy and pandera, which likely no longer need it.How was this patch tested?
Reproduced locally in an arm64 Python 3.12 venv:
uv pip install --dry-run --python-version 3.11 -r dev-requirements.inresolves to pyarrow 25.0.1 / numpy 1.26.4 / tensorflow 2.15.1. Dry-run resolution of each pinned plugin withnumpy<2.0.0picks pandas 2.3.3.No new tests: the existing tests that were failing are the regression tests for these changes.
Setup process
Screenshots
Check all the applicable boxes
Related PRs
Docs link