Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion tests/loggers/test_tensorboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import logging
import operator
import os
from argparse import Namespace
from unittest import mock
Expand All @@ -20,14 +21,19 @@
import torch
import yaml
from omegaconf import OmegaConf
from tensorboard.backend.event_processing.event_accumulator import EventAccumulator

from pytorch_lightning import Trainer
from pytorch_lightning.loggers import TensorBoardLogger
from pytorch_lightning.utilities.imports import _compare_version
from tests.helpers import BoringModel


@pytest.mark.skipif(
_compare_version("tensorboard", operator.ge, "2.6.0"), reason="cannot import EventAccumulator in >= 2.6.0"
)
def test_tensorboard_hparams_reload(tmpdir):
from tensorboard.backend.event_processing.event_accumulator import EventAccumulator

class CustomModel(BoringModel):
def __init__(self, b1=0.5, b2=0.999):
super().__init__()
Expand Down