Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 early stop module #301
Add early stop module #301
Changes from 22 commits
d0c454f
8938bf5
6136a90
6f20445
52546e9
fe610db
92fe751
c73d04c
fe57eea
2d939b3
5627c72
311de1c
0471905
27bf361
3142889
f4ad580
9d09429
00320fc
5c48474
bf2504d
476343e
dd3e964
080fd90
a9fe020
0a4d6b8
fda2946
14da12d
a1aecfd
a0a8128
da842cd
171fcc1
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can be more specific with the dict type here. At the very least, I think we can annotated it as
dict[str, tuple[Any, type[T]]]
. It's possible that we can also dodict[str, tuple[SnapShotter[T], type[T]]]
but I'm less certain that will come out right.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is
T
generic?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes T is generic and because of that I actually get an error even when I write
tuple[Any, type[T]]]
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can make it more specific with
tuple[Snapshotter, Any]
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting. I'm good with the slightly stricter typing. Certain things with generics are always trickier.