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

Fix incorrect design for RunningAverage, Frequency, ModelCheckpoint, ... #1405

Closed
vfdev-5 opened this issue Oct 25, 2020 · 2 comments
Closed
Assignees

Comments

@vfdev-5
Copy link
Collaborator

vfdev-5 commented Oct 25, 2020

🐛 Bug description

Thanks to PRs on mypy annotation by @gruebel we discovered few classes where we have to redesign methods in order to keep consistency with their base classes.

@gruebel please comment here if you think about other classes/methods we did a type relaxation.

cc @sdesrozis @fco-dv

@gruebel
Copy link
Contributor

gruebel commented Oct 26, 2020

Similar to Frequency also GpuInfo inherits from Metric, so the attach method should have the same signature

def attach(self, engine: Engine, name: str = "gpu", event_name: Union[str, EventEnum] = Events.ITERATION_COMPLETED):
engine.add_event_handler(event_name, self.completed, name)

Should be also type ignored in issue #1406 till it is fixed.

@vfdev-5
Copy link
Collaborator Author

vfdev-5 commented Apr 1, 2024

Closing as solved

@vfdev-5 vfdev-5 closed this as completed Apr 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants