-
Notifications
You must be signed in to change notification settings - Fork 36
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
list[(name, Thing)] to dict[name, Thing], and remove MetricConfig and directly store configs in Metric #491
Comments
|
Potential change would be:
I'm still waiting for comments @neubig @pfliu-nlp @tetsuok |
@odashi I agree with the proposal and the potential changes. Removing the circular dependency seems a good idea to make things simpler. |
In general, I think it looks good. I think the reason why we have two separate classes originally (
HitsConfig(name='Hits1', hits_k=1),
HitsConfig(name='Hits2', hits_k=2),
HitsConfig(name='Hits3', hits_k=3),
HitsConfig(name='Hits5', hits_k=5),
HitsConfig(name='Hits10', hits_k=10), When we merge (Again, I think this refactoring will potentially affect explainaboard web and I will follow PRs on this discussion.) |
It looks natural to me, though it also looks the |
Hi, @odashi
Yes, this is another good point: do we need to shift the way of storing A similar thing happens in the |
@pfliu-nlp I think we can first implement |
I found that ExplainaBoard/explainaboard/metrics/eaas.py Line 107 in 215785c
EaaSMetricConfig should have a field to specify this value (it may have the same name name )
|
Sorry about the late comment on this, but I agree with getting rid of MetricConfig. Sounds good! |
EDIT: This issue is currently represents two separate topics:
list[(name, Thing)]
data structure todict[name, Thing]
if the name is the primary key.Metric
itself.Original proposal:
Metric
is instantiated by appropriateMetricConfig
. This strategy is used only inMetric
and any other classes are instantiated by directly calling__init__
with specific arguments. This special architecture aroundMetric
actually causes some confusion (e.g., #455).This separation also requires explicit circular dependency:
Metric
holdsMetricConfig
, whileMetricConfig
knows correspondingMetric
(into_metric
). This is somewhat annoying because it always lets us to refactor both concepts at the same time.As long as I checked the all subclasses of
Metric
, there is no heavy implementation: they simply hold configs without any special initialization processes. It looks we have no any reason to separateMetricConfig
fromMetric
at interface level. Integrating them into theMetric
could simplify the architecture.RFC: @neubig @pfliu-nlp @tetsuok
The text was updated successfully, but these errors were encountered: