unit8co/darts

[BUG] Optuna-Integration no longer depends on pytorch-lightning

Open

#3093 opened on Apr 30, 2026

View on GitHub
 (3 comments) (0 reactions) (0 assignees)Python (6,832 stars) (762 forks)batch import
dependenciesgood first issuepr_welcome

Description

Describe the bug optuna-integration[pytorch-lightning] now depends on lightning and not pytorch-lightning any more. Running uv sync --group dev-all --upgrade will result in an error due to lightning not being available on win32 py312 (the package does exist on win32 py312, but there might be markers from other packages that prevent the resolution.)

To Reproduce Steps to reproduce the behavior, preferably code snippet.

uv sync --group dev-all --upgrade
  × No solution found when resolving dependencies for split (markers: python_full_version == '3.12.*' and platform_machine != 's390x' and sys_platform ==
  │ 'win32'):
  ╰─▶ Because there are no versions of lightning and optuna-integration[pytorch-lightning]>=4.7.0 depends on lightning, we can conclude that
      optuna-integration[pytorch-lightning]>=4.7.0 cannot be used.
      And because only the following versions of optuna-integration[pytorch-lightning] are available:
          optuna-integration[pytorch-lightning]<=4.7.0
          optuna-integration[pytorch-lightning]==4.8.0
      we can conclude that optuna-integration[pytorch-lightning]>=4.7.0,<4.8.0 cannot be used. (1)

      Because there are no versions of lightning and optuna-integration[pytorch-lightning]==4.8.0 depends on lightning, we can conclude that
      optuna-integration[pytorch-lightning]==4.8.0 cannot be used.
      And because we know from (1) that optuna-integration[pytorch-lightning]>=4.7.0,<4.8.0 cannot be used, we can conclude that
      optuna-integration[pytorch-lightning]>=4.7.0 cannot be used.
      And because darts:dev-all depends on optuna-integration[pytorch-lightning]>=4.7.0 and your project requires darts:dev-all, we can conclude that your
      project's requirements are unsatisfiable.

      hint: While the active Python version is 3.13, the resolution failed for other Python versions supported by your project. Consider limiting your
      project's supported Python versions using `requires-python`.

Immediate suggested solution is to change optional dependency group from:

optuna-integration[pytorch-lightning]>=4.7.0

to

optuna-integration>=4.7.0

However, a longer-term solution might be to address #2198, i.e., migrate from pytorch-lightning to lightning.

Expected behavior A clear and concise description of what you expected to happen.

System (please complete the following information):

  • Python version: 3.13.12
  • darts version: latest source
  • macOS: 26.3
  • uv: 0.10.2

Additional context Add any other context about the problem here.

Contributor guide