Migrate F1 score to core
System information
- TensorFlow version (you are using): 2.0
- TensorFlow Addons version: head
- Is it in the tf.contrib (if so, where): N/A
- Are you willing to contribute it (yes/no): @pavithrasv can if there are no community members who are interest
- Are you willing to maintain it going forward? (yes/no): yes
Describe the feature and the current behavior/state. There is interest from the Keras team in having a core implementation of F1 score. We note that addons has that currently, so we would be looking to migrate the existing implementation to core for F1 score.
Will this change the current api? How? tfa.metrics.f_scores.F1Score would move to tf.keras.metrics.F1Score: https://github.com/tensorflow/addons/blob/master/tensorflow_addons/metrics/f_scores.py#L255
If desired for backwards compatibility, tfa could link to these symbols from the current location, though my guess is that's more debt than necessary.
Any Other info. @seanpmorgan -- thoughts?
Sounds good to me. I don't think we need to guarantee backwards compatibility, but it could be a good use case to see how we would do it (If parameter order moves I'm okay with that since we're still v0.x). maybe something like tfa.metrics.graduated which just aliases the new implementation in core-tf?
cc @SSaishruthi @Squadrick as code owners.
How are we planning to take this forward? Would like to contribute to the migration as well if needed anywhere
That would be great-- care to submit a PR to the TensorFlow repo, under Keras metrics? https://github.com/tensorflow/tensorflow/blob/master/tensorflow/python/keras/metrics.py
@pavithrasv can advise + review as well.
Thanks--
Perfect! Will do. Thanks @karmel
Thank you @SSaishruthi
For tracking this is https://github.com/tensorflow/tensorflow/pull/31818
2 comments from my side:
- there is still a TODO in the file - IMO this should me implemented first
- What about the test? Should that be part of the PR?
@PhilipMay Thanks We are working on test and todo. I will be added as well
IMO there is a serious bug in F1: #490
@seanpmorgan I am thinking of updating TF core PR with the new updated scripts. Is that ok?
@seanpmorgan I am thinking of updating TF core PR with the new updated scripts. Is that ok?
Yes makes sense to me. I would request that the same updates be made for Addons as well so that when we retire them in addons it should match.
Sure. I will update both. Thanks
@seanpmorgan
Updating in core migration
@seanpmorgan Updating test file. should be done soon
Guess #746 should be cleared before migrating to core?
Is this still "in progress"? Need we an RFC in the community repo?
I think there is no progress.
@bhack @PhilipMay We will revisit every metric and make sure that it covers all the basic use cases listed here.
Closing this as it's quite stale. Per https://github.com/tensorflow/addons/pull/2156 migrations will now be handled by core TF and Keras team members.