Skip to content

Commit

Permalink
remove python3.8 dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
poodarchu committed Apr 13, 2023
1 parent 1a16148 commit c0431b2
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions efg/utils/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import time
from collections import defaultdict
from contextlib import contextmanager
from functools import cached_property

import torch

Expand Down Expand Up @@ -136,11 +135,8 @@ def __init__(self, log_dir: str, **kwargs):
self._writer_args = {"log_dir": log_dir, **kwargs}
self._last_write = -1

@cached_property
def _writer(self):
from torch.utils.tensorboard import SummaryWriter

return SummaryWriter(**self._writer_args)
self._writer = SummaryWriter(**self._writer_args)

def write(self, window_size=20):
storage = get_event_storage()
Expand Down

0 comments on commit c0431b2

Please sign in to comment.