-
Notifications
You must be signed in to change notification settings - Fork 39
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
Ability to dynamically change InstanceMetric inputs + grammar metrics #736
Conversation
Signed-off-by: Ariel Gera <ariel.gera1@ibm.com>
Signed-off-by: Ariel Gera <ariel.gera1@ibm.com>
…ce metric Signed-off-by: Ariel Gera <ariel.gera1@ibm.com>
Signed-off-by: Ariel Gera <ariel.gera1@ibm.com>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #736 +/- ##
==========================================
+ Coverage 91.00% 91.03% +0.02%
==========================================
Files 98 98
Lines 9733 9760 +27
==========================================
+ Hits 8858 8885 +27
Misses 875 875 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Ariel Gera <ariel.gera1@ibm.com>
Ariel, I'm not sure about the generic part change. We have an alternative mechanism for this of using MetricPipeline , which can map the field to the reference fields.
|
@yoavkatz The task fields are still shared across all metrics. But there are many use cases - specifically, reference-less ones - where you want to apply an existing metric but use a different field (an input field, which is still one of the task fields). I don't think it makes sense to create a new metric for every possible field that one would want to pass. |
I see the point. Still, some points to consider:
I tend to think we while we simplified the particular use, we complicated the overall API, because there is now a new way of doing things (which does not replace the old way, and is also less explicit).
|
So I do not have the full picture, but regarding both 2 and 3 my feeling is that the real underlying issue is that the different types of metric classes do not really share methods, which is something that should probably be improved regardless of this specific question. Once the different types of metrics have more methods in common, things like the field modification I did here and the type checking can both happen in a more centralized place, which will solve most of the issues you mention. I do understand what you are saying about complicating the API. But since tasks -- even similar ones -- often differ in the name of their input fields, my feeling is that the cost of having a separate metric for every possible field name will very quickly blow out of proportion, which is also a serious problem. In other words, the API may be simpler but the catalog will be more complicated. |
@arielge - it think it's not only a matter of which filed to use We should also give clear score names right now we char_edit_distance But the second needs to be something like char_edit_distance_from_original_text to be differentiated . |
I agree, this is what I was aiming for with this issue #737. |
I see. Today we have the explicit way of doing this: metric = MetricPipeline( I agree it would be nicer to have it shorter. metrics.char_edit_distance[reference_field=original_text, score_name=char_edit_distance_from_original_input] We need to make sure:
metrics.char_edit_distance[multiple_references_field=original_text, score_name=char_edit_distance_from_original_input]
|
That sounds good to me |
No description provided.