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.

貢獻者指南