Skip to content

Commit

Permalink
feat: Don't store data loader in the state
Browse files Browse the repository at this point in the history
  • Loading branch information
lRomul committed Apr 18, 2024
1 parent 4100840 commit 8a8903c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions argus/engine/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ def __init__(self,
phase_states[self.phase] = self
self.phase_states = phase_states
self.logger: logging.Logger = self.model.logger
self.data_loader: Optional[Iterable] = None
self.exception: Optional[BaseException] = None
self.engine: Optional[Engine] = engine

Expand Down Expand Up @@ -224,8 +223,7 @@ def run(self, data_loader: Iterable,
State: An engine state.
"""
self.state.update(data_loader=data_loader,
epoch=start_epoch,
self.state.update(epoch=start_epoch,
iteration=0,
stopped=False)

Expand All @@ -250,6 +248,7 @@ def run(self, data_loader: Iterable,

self.raise_event(Events.EPOCH_COMPLETE)
self.state.epoch += 1
del data_loader

self.raise_event(Events.COMPLETE)

Expand Down

0 comments on commit 8a8903c

Please sign in to comment.