Skip to content

Missing jsonargparse as dependency #21018

@IsaiahHarvi

Description

@IsaiahHarvi

Bug description

This is a 'object() takes no arguments' bug that is related to lightning not installing:
jsonargparse[signatures]>=4.27.7

What version are you seeing the problem on?

v2.5

Reproduced in studio

No response

How to reproduce the bug

Error messages and logs

  File "~/Projects/rf_ml/.venv/lib/python3.13/site-packages/lightning/pytorch/core/saving.py", line 91, in _load_from_checkpoint
    model = _load_state(cls, checkpoint, strict=strict, **kwargs)
  File "~/Projects/rf_ml/.venv/lib/python3.13/site-packages/lightning/pytorch/core/saving.py", line 165, in _load_state
    obj = instantiator(cls, _cls_kwargs) if instantiator else cls(**_cls_kwargs)
          ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
  File "~/Projects/rf_ml/.venv/lib/python3.13/site-packages/lightning/pytorch/cli.py", line 862, in instantiate_module
    parser = ArgumentParser(exit_on_error=False)
TypeError: object() takes no arguments
 

Environment

Current environment
* CUDA:
        - GPU:               None
        - available:         False
        - version:           None
* Lightning:
        - lightning:         2.5.1.post0
        - lightning-utilities: 0.14.3
        - pytorch-lightning: 2.5.1.post0
        - torch:             2.7.0
        - torchmetrics:      1.7.2
        - torchsig:          0.4.1
        - torchvision:       0.22.0
* Packages:
        - accessible-pygments: 0.0.5
        - adversarial-robustness-toolbox: 1.20.0
        - aiohappyeyeballs:  2.6.1
        - aiohttp:           3.12.4
        - aiosignal:         1.3.2
        - alabaster:         1.0.0
        - annotated-types:   0.7.0
        - anyio:             4.9.0
        - asttokens:         3.0.0
        - attrs:             25.3.0
        - autocommand:       2.2.2
        - babel:             2.17.0
        - backports.tarfile: 1.2.0
        - beautifulsoup4:    4.12.3
        - brotli:            1.1.0
        - build:             1.2.2.post1
        - certifi:           2025.4.26
        - cffi:              1.17.1
        - charset-normalizer: 3.4.2
        - click:             8.2.1
        - colorama:          0.4.6
        - contourpy:         1.3.2
        - cppy:              1.3.1
        - cycler:            0.12.1
        - cython:            3.0.12
        - decorator:         5.1.1
        - dnspython:         2.7.0
        - docker-pycreds:    0.4.0
        - docutils:          0.21.2
        - dpkt:              1.9.8
        - email-validator:   2.2.0
        - executing:         2.2.0
        - fastapi:           0.115.12
        - fastapi-cli:       0.0.7
        - filelock:          3.18.0
        - flake8:            7.1.1
        - fonttools:         4.58.0
        - frozenlist:        1.6.0
        - fsspec:            2025.5.1
        - gdown:             5.2.0
        - gitdb:             4.0.12
        - gitpython:         3.1.44
        - grpcio:            1.66.0
        - grpcio-tools:      1.66.0
        - h11:               0.16.0
        - h5py:              3.12.1
        - httpcore:          1.0.9
        - httptools:         0.6.4
        - httpx:             0.28.1
        - icecream:          2.1.4
        - id:                1.5.0
        - idna:              3.10
        - imagesize:         1.4.1
        - importlib-metadata: 8.5.0
        - inflect:           7.3.1
        - iniconfig:         2.1.0
        - installer:         0.7.0
        - ipdb:              0.13.13
        - ipython:           8.27.0
        - isort:             6.0.1
        - itsdangerous:      2.2.0
        - jaraco.classes:    3.4.0
        - jaraco.collections: 5.1.0
        - jaraco.context:    6.0.1
        - jaraco.functools:  4.1.0
        - jaraco.text:       3.12.1
        - jedi:              0.19.1
        - jinja2:            3.1.6
        - joblib:            1.4.2
        - keyring:           25.4.1
        - kiwisolver:        1.4.8
        - lightning:         2.5.1.post0
        - lightning-utilities: 0.14.3
        - linkify-it-py:     2.0.3
        - llvmlite:          0.43.0
        - lmdb:              1.5.1
        - lxml:              5.3.2
        - mako:              1.3.10
        - markdown-it-py:    3.0.0
        - markupsafe:        3.0.2
        - matplotlib:        3.10.3
        - matplotlib-inline: 0.1.7
        - mccabe:            0.7.0
        - mdit-py-plugins:   0.4.2
        - mdurl:             0.1.2
        - meson:             1.8.0
        - meson-python:      0.17.1
        - mock:              5.1.0
        - more-itertools:    10.5.0
        - mouseinfo:         0.1.3
        - mpmath:            1.3.0
        - multidict:         6.4.4
        - narwhals:          1.42.0
        - networkx:          3.4.2
        - nfstream:          6.5.4
        - nh3:               0.2.18
        - nids:              0.1.0
        - numba:             0.60.0
        - numpy:             2.2.6
        - oldest-supported-numpy: 0.1
        - olefile:           0.47
        - orjson:            3.10.18
        - packaging:         24.2
        - pandas:            2.2.3
        - parso:             0.8.4
        - pexpect:           4.9.0
        - piccolo-theme:     0.24.0
        - pillow:            11.2.1
        - pip:               25.1.1
        - pip-tools:         7.4.1
        - pkginfo:           1.10.0
        - platformdirs:      4.3.8
        - plotly:            6.1.2
        - pluggy:            1.6.0
        - ply:               3.11
        - prompt-toolkit:    3.0.48
        - propcache:         0.3.1
        - protobuf:          6.31.1
        - psutil:            7.0.0
        - psycopg2-binary:   2.9.10
        - ptyprocess:        0.7.0
        - pure-eval:         0.2.3
        - py-cpuinfo:        9.0.0
        - pyarrow:           19.0.1
        - pyautogui:         0.9.54
        - pybind11:          2.13.6
        - pycairo:           1.28.0
        - pycocotools:       2.0.8
        - pycodestyle:       2.12.1
        - pycparser:         2.22
        - pydantic:          2.11.5
        - pydantic-core:     2.33.2
        - pydantic-extra-types: 2.10.4
        - pydantic-settings: 2.9.1
        - pydata-sphinx-theme: 0.16.1
        - pyflakes:          3.2.0
        - pygetwindow:       0.0.9
        - pygments:          2.19.1
        - pygobject:         3.50.0
        - pymsgbox:          1.0.9
        - pyobjc-core:       10.3.1
        - pyobjc-framework-cocoa: 10.3.1
        - pyobjc-framework-quartz: 10.3.1
        - pypandoc:          1.13
        - pyparsing:         3.2.3
        - pyperclip:         1.9.0
        - pyproject-hooks:   1.2.0
        - pyproject-metadata: 0.9.1
        - pyqt-builder:      1.18.1
        - pyqt5:             5.15.11
        - pyqt5-sip:         12.17.0
        - pyrect:            0.2.0
        - pyscreeze:         1.0.1
        - pysocks:           1.7.1
        - pytest:            8.3.5
        - pytest-asyncio:    0.26.0
        - pytest-benchmark:  4.0.0
        - pytest-docker-pexpect: 0.9
        - pytest-mock:       3.14.0
        - python-dateutil:   2.9.0.post0
        - python-dotenv:     1.1.0
        - python-multipart:  0.0.20
        - pytorch-lightning: 2.5.1.post0
        - pytweening:        1.2.0
        - pytz:              2024.2
        - pywavelets:        1.8.0
        - pyyaml:            6.0.2
        - readme-renderer:   44.0
        - requests:          2.32.3
        - requests-toolbelt: 1.0.0
        - rf-ml:             0.1.0
        - rfc3986:           2.0.0
        - rich:              14.0.0
        - rich-toolkit:      0.14.6
        - roman-numerals-py: 3.1.0
        - rubicon-objc:      0.4.9
        - ruff:              0.11.11
        - scikit-learn:      1.6.0
        - scipy:             1.14.1
        - sentry-sdk:        2.29.1
        - setproctitle:      1.3.6
        - setuptools:        80.9.0
        - setuptools-scm:    8.3.0
        - shellingham:       1.5.4
        - sigkit:            0.0.3
        - sip:               6.10.0
        - six:               1.17.0
        - smmap:             5.0.2
        - sniffio:           1.3.1
        - snowballstemmer:   3.0.1
        - soupsieve:         2.6
        - sphinx:            8.2.3
        - sphinx-rtd-theme:  3.0.2
        - sphinxcontrib-applehelp: 2.0.0
        - sphinxcontrib-devhelp: 2.0.0
        - sphinxcontrib-htmlhelp: 2.1.0
        - sphinxcontrib-jquery: 4.1
        - sphinxcontrib-jsmath: 1.0.1
        - sphinxcontrib-qthelp: 2.0.0
        - sphinxcontrib-serializinghtml: 2.0.0
        - sqlalchemy:        2.0.41
        - stack-data:        0.6.3
        - starlette:         0.46.2
        - sympy:             1.14.0
        - tcai:              0.0.1
        - tcai-sdk:          0.1.0
        - textual:           0.82.0
        - threadpoolctl:     3.5.0
        - timm:              0.5.4
        - tomli:             2.2.1
        - torch:             2.7.0
        - torchmetrics:      1.7.2
        - torchsig:          0.4.1
        - torchvision:       0.22.0
        - tqdm:              4.67.1
        - traitlets:         5.14.3
        - twine:             6.1.0
        - typeguard:         4.3.0
        - typer:             0.15.4
        - typing-extensions: 4.13.2
        - typing-inspection: 0.4.1
        - tzdata:            2024.2
        - uc-micro-py:       1.0.3
        - ujson:             5.10.0
        - unicodedata2:      16.0.0
        - urllib3:           2.4.0
        - uv:                0.5.14
        - uvicorn:           0.34.2
        - uvloop:            0.21.0
        - wandb:             0.19.11
        - watchfiles:        1.0.5
        - wcwidth:           0.2.13
        - websockets:        15.0.1
        - wheel:             0.45.1
        - yarl:              1.20.0
        - zipp:              3.20.2
        - zopfli:            0.2.3.post1
* System:
        - OS:                Darwin
        - architecture:
                - 64bit
                -
        - processor:         arm
        - python:            3.11.12
        - release:           24.5.0
        - version:           Darwin Kernel Version 24.5.0: Tue Apr 22 19:52:00 PDT 2025; root:xnu-11417.121.6~2/RELEASE_ARM64_T6031

More info

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingneeds triageWaiting to be triaged by maintainersver: 2.5.x

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions