unit8co/darts

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

已关闭

#3,093 创建于 2026年4月30日

 (3 条评论) (0 个反应) (0 位负责人)Python (762 个派生)batch import
dependenciesgood first issuepr_welcome

仓库指标

星标
 (6,832 个星标)
PR 合并指标
 (平均合并 143天 16小时) (30 天内合并 16 个 PR)

描述

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.

贡献者指南