-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
[METRICS] Various improvements on metrics #466
Conversation
The cast function is now called inside Moreover I used the cast function in There are tests for tensors inputs in metrics and in .map |
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.
This is really cool and it's really nice to start seeing some test on metrics :)
A few comments
@@ -89,6 +90,38 @@ | |||
INCOMPLETE_SUFFIX = ".incomplete" | |||
|
|||
|
|||
@contextmanager | |||
def temp_seed(seed: int, set_pytorch=False, set_tensorflow=False): |
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.
Here there is an error with the tensorflow seed setter that I didn't have time to debug before my time off, maybe you can take a look? You can see the error simply by running the colab at https://colab.research.google.com/drive/1I_B1mcX0cOzOskr0rJN8u8xh_0CIken-?usp=sharing and using set_tensorflow=True
in its call of temp_seed
.
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 fixed tensorflow's rng for eager mode.
Not sure how to do it when eager mode is off. I tried a few things but it didn't work
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.
Awesome!
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 it's all good :)
Did you want to add something else @thomwolf ?
I think we can merge |
* disallow positional arguments in metrics methods * allow to use numpy/pytorch/tf/pandas objects in metrics * clean up GLUE dataset and metric doc * better checks to avoid positional arguments * style and quality * temp seed for everyone * fixes * more control * move cast to python in encode_example + add encode_batch * add metrics tests * cast to python objects in map * test cast to python objects in map * style * quality * remove kwargs in add and add_batch * fix download issue * add local + aws signature test on metrics * fix temp_seed for TF + add tests * better test Co-authored-by: Quentin Lhoest <lhoest.q@gmail.com>
predictions
vsreferences
mistakes