Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add manager._start_time to state_dict #795

Open
linshokaku opened this issue Nov 21, 2023 · 1 comment
Open

Add manager._start_time to state_dict #795

linshokaku opened this issue Nov 21, 2023 · 1 comment
Assignees

Comments

@linshokaku
Copy link
Member

if self._start_time is None:
self._start_time = _get_time()
self.start_extensions()

@property
def elapsed_time(self) -> float:
if self._start_time is None:
raise RuntimeError(
"Unavailable until the initial run_iteration call."
)
return _get_time() - self._start_time

When restarting from a snapshot, _start_time is initialized and elapsedtime cannot be obtained correctly, so _start_time should be treated as state.

@kmaehashi
Copy link
Member

If we are to fix this, I think it's better to record elapsed_time in state dict and accumulate the "real" time consumed (i.e., excluding the time process is stopped)

@linshokaku linshokaku self-assigned this Nov 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants