Files
Bhimraj Yadav 21ac841166 fix: LightningCLI emitting jsonargparse deprecation warnings (#21906)
* fix: avoid deprecated jsonargparse APIs in LightningCLI

jsonargparse 4.49 deprecated `ArgumentParser.instantiate_classes` and 4.50
the `skip_none` argument of `dump`/`save`, so `LightningCLI` emitted
deprecation warnings on recent versions.

Both are now version-gated on jsonargparse>=4.50, since `skip_unset` does
not exist in 4.49 and `dump`/`save` accept `**kwargs`, which would silently
drop `None` entries from the saved config.

The parser-scoped `add_instantiator` is deliberately kept: its replacement
registers instantiators process-wide and would leak between LightningCLI
instances, so the warning is silenced instead.

Also raises the jsonargparse upper pin so CI exercises the new code path.

Fixes #21900

* refactor: tighten jsonargparse compat shims and comments

Condense the version-gate and `add_instantiator` comments to what is not
derivable from the code, drop the docstring from `_instantiate` to match the
other private helpers in the module, and collapse `_KEEP_NONE_KWARGS` into a
single expression.

Drop `test_cli_no_jsonargparse_deprecation_warnings` and its now-unused
imports. Keep the changelog entry version-agnostic, since the single 4.50 gate
leaves `instantiate_classes` in use on 4.49.
2026-09-01 08:55:20 +00:00
..
2024-02-26 08:25:00 -05:00

Project Requirements

This root requirements folder branches into sub-folders depending on the python package. Within the folder, we have grouped requirements files/lists per focus, which shall closely match package extra So, for example, when you install PL as pip install pytorch-lightning[extra], this list is stored in requirements/pytorch/extra.txt.

CI/CD upper bounds

For Ci stability, we have set for all package versions upper bounds (the latest version), so with any sudden release, we won't put our development on fire. The continues updated of these upper bounds are managed by dependabot. Note that these upper bounds are lifters when installing a package from the source or as a package. If you want to preserve/enforce restrictions on the latest compatible version, add "strict" as an in-line comment.