-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Markers/wrap up #10062
Markers/wrap up #10062
Conversation
rasa/cli/evaluate.py
Outdated
@@ -120,30 +124,32 @@ def _run_markers( | |||
strategy: Strategy to use when selecting trackers to extract from. | |||
config: Path to the markers definition file to use. | |||
output_filename: Path to write out the extracted markers. | |||
stats_file: (Optional) Path to write out statistics about the extracted | |||
markers. | |||
stats_file_prefix: (Optional) Prefix of paths to write out statistics about the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a bit unclear since a path prefix is a different thing to what we're talking about here (a path, with a prefix to be appended to a file name)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any suggestion for a nice name? :/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the name is fine, but the docs should maybe read differently - it's a bit complicated because this is bundling two separate things in, a path, and the name prefix. Maybe something like "The path where stats files should be stored, and a prefix used to construct the stats file names" or something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tried to add that to both the docstr and the help text with an example. A bit lengthy now but should be clearer now?
session_stats_file=_append_suffix(stats_file_prefix, STATS_SESSION_SUFFIX), | ||
overall_stats_file=_append_suffix(stats_file_prefix, STATS_OVERALL_SUFFIX), | ||
) | ||
except (FileExistsError, NotADirectoryError) as e: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Neat 😎
contained in a directory that does not exist | ||
""" | ||
# Check files and folders before doing the costly swipe over the trackers: | ||
for path in [session_stats_file, overall_stats_file, output_file]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I put this in the CLI because I figured it would let us have a flag to allow the user to force an overwrite, do we want to bother adding in that feature right now or put it on the list of future enhancements?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the idea :D (had also put an overwrite parameter to the stats :D) - But since it wasn't in the list of requirements, let's just ignore it for now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* connect stats and cli; rm unused types from marker.py; ... * rm unused schemata * try to improve docstr/help * Fix stats CLI command inversion * fix help test (nargs=? -> stats file prefix is optional) Co-authored-by: Matthew Summers <m.summers@rasa.com>
Proposed changes:
Status (please check what you already did):
black
(please check Readme for instructions)