Skip to content

Commit

Permalink
Bump lightning version to 2.3.3 (#3796)
Browse files Browse the repository at this point in the history
* update for resolving cve-2024-5980 from lightning 2.2.2

* update torch lr scheduler importing logic
  • Loading branch information
yunchu authored Aug 8, 2024
1 parent 63842a9 commit c61e7d6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ xpu = [

base = [
"torch==2.2.2",
"lightning==2.2",
"lightning==2.3.3",
"pytorchcv",
"timm==1.0.3",
"openvino==2024.3",
Expand Down
7 changes: 3 additions & 4 deletions src/otx/core/schedulers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,18 @@

from typing import Callable

from lightning.fabric.utilities.types import _TORCH_LRSCHEDULER
from lightning.pytorch.cli import ReduceLROnPlateau
from torch.optim.lr_scheduler import LRScheduler
from torch.optim.optimizer import Optimizer

from otx.core.schedulers.callable import SchedulerCallableSupportHPO
from otx.core.schedulers.warmup_schedulers import LinearWarmupScheduler, LinearWarmupSchedulerCallable

LRSchedulerListCallable = Callable[[Optimizer], list[LRScheduler | ReduceLROnPlateau]]

__all__ = [
"LRSchedulerListCallable",
"LinearWarmupScheduler",
"LinearWarmupSchedulerCallable",
"SchedulerCallableSupportHPO",
]


LRSchedulerListCallable = Callable[[Optimizer], list[_TORCH_LRSCHEDULER | ReduceLROnPlateau]]

0 comments on commit c61e7d6

Please sign in to comment.