Skip to content
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

Allow evaluate CLI to take metrics from the command line arguments #8519

Open
narayanacharya6 opened this issue Jun 28, 2021 · 2 comments
Open
Labels
enhancement Feature requests and improvements feat / cli Feature: Command-line interface

Comments

@narayanacharya6
Copy link
Contributor

Currently the evaluate CLI has fixed list of metrics which are reported as part of the evaluation output. This is limiting when one wishes to make note of other metrics/scores that are part of custom pipeline components in their evaluation outputs. My suggestions is to allow users to pass a list of metrics that they wish to add to the existing set of metrics that are part of the evaluate CLI script.

Which page or section is this issue related to?

https://github.com/explosion/spaCy/blob/master/spacy/cli/evaluate.py#L79-L97

@svlandeg svlandeg added enhancement Feature requests and improvements feat / cli Feature: Command-line interface labels Jun 29, 2021
@adrianeboyd
Copy link
Contributor

Hi, yes, we definitely need to think about how to make this more flexible for new/custom components.

In the meanwhile, the CLI scripts should be pretty easy to copy and adapt for your own needs. You can copy spacy/cli/evaluate.py, convert the relative imports into absolute imports with spacy.whatever and run it as a standalone script.

@narayanacharya6
Copy link
Contributor Author

Yes, that is my current approach to work around it :) If you guys have anything in mind of how you'd like to see this, we can discuss that and I'm happy to submit a PR if we decide that the change is good.

My naive approach would be to take in a python-style dict as a string from the CLI, evaluate that string as a dict (maybe some of the code from config parsing can be helpful here if we don't want use the ast.literal_eval, etc.?) and simply update the default dictionary of metrics that we already have.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature requests and improvements feat / cli Feature: Command-line interface
Projects
None yet
Development

No branches or pull requests

3 participants