Naming inconsistency
See original GitHub issueDescribe the bug I found that some names agruments in framework aren’t consistent. So for example:
class SupervisedRunner(Runner):
"""Runner for experiments with supervised model."""
_experiment_fn: Callable = SupervisedExperiment
def __init__(
self,
model: Model = None,
device: Device = None,
input_key: Any = "features",
output_key: Any = "logits",
input_target_key: str = "targets", # This argument corresponds to input_key argument in CriterionCallback
):
class CriterionCallback(_MetricCallback):
"""Callback for that measures loss with specified criterion."""
def __init__(
self,
input_key: Union[str, List[str], Dict[str, str]] = "targets", # This argument corresponds to input_target_key argument in SupervisedRunner
output_key: Union[str, List[str], Dict[str, str]] = "logits",
prefix: str = "loss",
criterion_key: str = None,
multiplier: float = 1.0,
**metric_kwargs,
):
To Reproduce Steps to reproduce the behavior:
- Check files:
catalyst.core.callback.metric.py
andcatalyst.dl.runner.supervised.py
Expected behavior I expect that names would be consistent across the framework and means the same
Issue Analytics
- State:
- Created 3 years ago
- Comments:17 (14 by maintainers)
Top Results From Across the Web
Code Inspection: Inconsistent Naming - ReSharper - JetBrains
This inspection notifies you about violations of symbol naming style whether you use the default set of naming rules or configure your ...
Read more >CWE-1099: Inconsistent Naming Conventions for Identifiers (4.9)
CWE-1099: Inconsistent Naming Conventions for Identifiers ; ChildOf, Class - a weakness that is described in a very abstract fashion, typically ...
Read more >Finding Non-trivial Malware Naming Inconsistencies - SysSec
Clearly, solving naming inconsistencies is a very difficult task, as it requires that vendors agree on a unified naming convention.
Read more >Bad Habits to Kick : Inconsistent naming conventions
In this post, I want to treat the use of inconsistent naming conventions. Stored Procedures. In one of the systems I've inherited, ...
Read more >Inconsistency in naming of SQL agent collector - IBM
Cause. While upgrading the SQL agent from version 6.2.3 (or lower) to version 6.3.1, the collector service name will be renamed.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
How it now
input_target_key corresponds to input_key argument in CriterionCallback
input_target_key: str = "targets"
input_key corresponds to input_target_key argument in SupervisedRunner
input_key: Union[str, List[str], Dict[str, str]] = "targets"
How it should
Since
CriterionCallback
calcucates criterion betweentarget
(orinput_target_key
) andoutput_key
it should be better to renameinput_key
toinput_target_key
as in theSupervisedRunner
Also I suggest to check this across whole framework
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.