addons icon indicating copy to clipboard operation
addons copied to clipboard

Migrate F1 score to core

Open karmel opened this issue 7 years ago • 19 comments

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?

karmel avatar Aug 19 '19 17:08 karmel

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.

seanpmorgan avatar Aug 20 '19 00:08 seanpmorgan

How are we planning to take this forward? Would like to contribute to the migration as well if needed anywhere

SSaishruthi avatar Aug 20 '19 07:08 SSaishruthi

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--

karmel avatar Aug 20 '19 16:08 karmel

Perfect! Will do. Thanks @karmel

SSaishruthi avatar Aug 20 '19 16:08 SSaishruthi

Thank you @SSaishruthi

pavithrasv avatar Aug 20 '19 17:08 pavithrasv

For tracking this is https://github.com/tensorflow/tensorflow/pull/31818

seanpmorgan avatar Aug 28 '19 01:08 seanpmorgan

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 avatar Sep 09 '19 19:09 PhilipMay

@PhilipMay Thanks We are working on test and todo. I will be added as well

SSaishruthi avatar Sep 09 '19 20:09 SSaishruthi

IMO there is a serious bug in F1: #490

PhilipMay avatar Sep 09 '19 21:09 PhilipMay

@seanpmorgan I am thinking of updating TF core PR with the new updated scripts. Is that ok?

SSaishruthi avatar Oct 03 '19 20:10 SSaishruthi

@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.

seanpmorgan avatar Oct 04 '19 12:10 seanpmorgan

Sure. I will update both. Thanks

SSaishruthi avatar Oct 10 '19 21:10 SSaishruthi

@seanpmorgan

Updating in core migration

SSaishruthi avatar Nov 05 '19 04:11 SSaishruthi

@seanpmorgan Updating test file. should be done soon

SSaishruthi avatar Dec 06 '19 21:12 SSaishruthi

Guess #746 should be cleared before migrating to core?

MadsAdrian avatar Dec 07 '19 18:12 MadsAdrian

Is this still "in progress"? Need we an RFC in the community repo?

bhack avatar Jul 17 '20 13:07 bhack

I think there is no progress.

PhilipMay avatar Jul 17 '20 15:07 PhilipMay

@bhack @PhilipMay We will revisit every metric and make sure that it covers all the basic use cases listed here.

AakashKumarNain avatar Jul 17 '20 17:07 AakashKumarNain

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.

seanpmorgan avatar Sep 10 '20 03:09 seanpmorgan