Fedora Account System
Red Hat Associate
Red Hat Customer
python-accelerate fails to build with Python 3.15.0a8. 3 tests fail with a similar issue: ____________ CPUOptimizerTester.test_accelerated_optimizer_pickling ____________ self = <test_optimizer.CPUOptimizerTester testMethod=test_accelerated_optimizer_pickling> def test_accelerated_optimizer_pickling(self): model = torch.nn.Linear(10, 10) > optimizer = torch.optim.SGD(model.parameters(), 0.1) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ tests/test_optimizer.py:28: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.15/site-packages/torch/optim/sgd.py:65: in __init__ super().__init__(params, defaults) /usr/lib64/python3.15/site-packages/torch/optim/optimizer.py:408: in __init__ self.add_param_group(cast(dict, param_group)) /usr/lib64/python3.15/site-packages/torch/_compile.py:47: in inner import torch._dynamo /usr/lib64/python3.15/site-packages/torch/_dynamo/__init__.py:76: in <module> from .polyfills import loader as _ # usort: skip # noqa: F401 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib64/python3.15/site-packages/torch/_dynamo/polyfills/loader.py:34: in <module> POLYFILLED_MODULES: tuple["ModuleType", ...] = tuple( ^^^^^ /usr/lib64/python3.15/site-packages/torch/_dynamo/polyfills/loader.py:35: in <genexpr> importlib.import_module(f".{submodule}", package=polyfills.__name__) /usr/lib64/python3.15/importlib/__init__.py:88: in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib64/python3.15/site-packages/torch/_dynamo/polyfills/struct.py:20: in <module> @substitute_in_graph(struct.pack, can_constant_fold_through=True) # type: ignore[arg-type] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ traceable_fn = <function pack at 0x7f50247c78a0> def wrapper(traceable_fn: Callable[_P, _R]) -> Callable[_P, _R]: if not is_function(traceable_fn): raise TypeError( f"@substitute_in_graph(...) expects a function but got {type(traceable_fn)!r}" ) if not skip_signature_check: try: original_sig = inspect.signature(original_fn) except ValueError: pass else: traceable_sig = inspect.signature(traceable_fn) def sig_ident( sig: inspect.Signature, ) -> tuple[tuple[str, ...], set[str], dict[str, Any]]: # Ignore annotations for parameters and return type return ( tuple( p.name for p in sig.parameters.values() if ( p.kind not in { p.KEYWORD_ONLY, # the name of *args and **kwargs is not important p.VAR_POSITIONAL, p.VAR_KEYWORD, } ) ), { p.name for p in sig.parameters.values() if p.kind == p.KEYWORD_ONLY }, { p.name: p.default for p in sig.parameters.values() # the name of *args and **kwargs is not important if p.kind not in {p.VAR_POSITIONAL, p.VAR_KEYWORD} }, ) wildcard_sig = inspect.signature(lambda *args, **kwargs: None) if ( sig_ident(original_sig) != sig_ident(traceable_sig) and sig_ident(original_sig) != sig_ident(wildcard_sig) and sig_ident(traceable_sig) != sig_ident(wildcard_sig) ): > raise TypeError( f"Signature mismatch between {original_fn} and {traceable_fn}: " f"{original_sig} != {traceable_sig}" ) E TypeError: Signature mismatch between <built-in function pack> and <function pack at 0x7f50247c78a0>: (format, /, *values) != (fmt: 'bytes | str', /, *v: 'Any') -> 'bytes' https://docs.python.org/3.15/whatsnew/3.15.html For the build logs, see: https://copr-be.cloud.fedoraproject.org/results/@python/python3.15/fedora-rawhide-x86_64/10341837-python-accelerate/ For all our attempts to build python-accelerate with Python 3.15, see: https://copr.fedorainfracloud.org/coprs/g/python/python3.15/package/python-accelerate/ Testing and mass rebuild of packages is happening in copr. You can follow these instructions to test locally in mock if your package builds with Python 3.15: https://copr.fedorainfracloud.org/coprs/g/python/python3.15/ Let us know here if you have any questions. Python 3.15 is planned to be included in Fedora 45. To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.15. A build failure prevents us from testing all dependent packages (transitive [Build]Requires), so if this package is required a lot, it's important for us to get it fixed soon. We'd appreciate help from the people who know this package best, but if you don't want to work on this now, let us know so we can try to work around it on our side.
Hmm, thank you for alerting me to this. I wonder if this is actually an issue with PyTorch's dynamo not being compatible with Python 3.15? I'm adding Tom Rix, who is the torch maintainer, to see if this matches what he's seen previously.
*** Bug 2485756 has been marked as a duplicate of this bug. ***
Hello, Please note that this comment was generated automatically by https://forge.fedoraproject.org/releng/tooling/src/branch/main/release-process/bug-filing/follow-policy/follow_policy.py If you feel that this output has mistakes, please open an issue at https://forge.fedoraproject.org/releng/tickets/issues This package fails to install and maintainers are advised to take one of the following actions: - Fix this bug and close this bugzilla once the update makes it to the repository. (The same script that posted this comment will eventually close this bugzilla when the fixed package reaches the repository, so you don't have to worry about it.) or - Move this bug to ASSIGNED if you plan on fixing this, but simply haven't done so yet. or - Orphan the package if you no longer plan to maintain it. If you do not take one of these actions, the process at https://docs.fedoraproject.org/en-US/fesco/Fails_to_build_from_source_Fails_to_install/#_package_removal_for_long_standing_ftbfs_and_fti_bugs will continue. This package may be orphaned in 7+ weeks. This is the first reminder (step 3) from the policy. Don't hesitate to ask for help on https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/ if you are unsure how to fix this bug.
Hello, Please note that this comment was generated automatically by https://forge.fedoraproject.org/releng/tooling/src/branch/main/release-process/bug-filing/follow-policy/follow_policy.py If you feel that this output has mistakes, please open an issue at https://forge.fedoraproject.org/releng/tickets/issues This package fails to install and maintainers are advised to take one of the following actions: - Fix this bug and close this bugzilla once the update makes it to the repository. (The same script that posted this comment will eventually close this bugzilla when the fixed package reaches the repository, so you don't have to worry about it.) or - Move this bug to ASSIGNED if you plan on fixing this, but simply haven't done so yet. or - Orphan the package if you no longer plan to maintain it. If you do not take one of these actions, the process at https://docs.fedoraproject.org/en-US/fesco/Fails_to_build_from_source_Fails_to_install/#_package_removal_for_long_standing_ftbfs_and_fti_bugs will continue. This package may be orphaned in 4+ weeks. This is the second reminder (step 4) from the policy. Don't hesitate to ask for help on https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/ if you are unsure how to fix this bug.