Skip to content

Commit

Permalink
Use latest pytorch-lightning version (#926)
Browse files Browse the repository at this point in the history
Previously, we had fixed the version to an earlier release, which became incompatible after pip updated to 24.1. So, we took this opportunity to update it to the latest version.
  • Loading branch information
hstonec committed Jul 2, 2024
1 parent 9c509c1 commit c8a4316
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
3 changes: 2 additions & 1 deletion dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ pyre-extensions
pyre-check
pytest
pytest-cov
pytorch-lightning==1.5.10
pytorch-lightning==2.3.1
tensorboard==2.14.0
sagemaker>=2.149.0
torch-model-archiver>=0.4.2
torch==2.2.1
Expand Down
9 changes: 5 additions & 4 deletions torchx/examples/apps/lightning/profiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,19 @@
import time
from typing import Dict

from pytorch_lightning.loggers.base import LightningLoggerBase
from pytorch_lightning.profiler.base import BaseProfiler
from pytorch_lightning.loggers.logger import Logger

from pytorch_lightning.profilers.profiler import Profiler

class SimpleLoggingProfiler(BaseProfiler):

class SimpleLoggingProfiler(Profiler):
"""
This profiler records the duration of actions (in seconds) and reports the
mean duration of each action to the specified logger. Reported metrics are
in the format `duration_<event>`.
"""

def __init__(self, logger: LightningLoggerBase) -> None:
def __init__(self, logger: Logger) -> None:
super().__init__()

self.current_actions: Dict[str, float] = {}
Expand Down

0 comments on commit c8a4316

Please sign in to comment.