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

Optional arguments to rasa data convert are not optional #7362

Closed
1 task
kaiogu opened this issue Nov 25, 2020 · 2 comments
Closed
1 task

Optional arguments to rasa data convert are not optional #7362

kaiogu opened this issue Nov 25, 2020 · 2 comments
Assignees
Labels
area:rasa-oss/cli Issues focused on the rasa command-line-interface area:rasa-oss 🎡 Anything related to the open source Rasa framework effort:atom-squad/1 Label which is used by the Rasa Atom squad to do internal estimation of task sizes. type:bug 🐛 Inconsistencies or issues which will cause an issue or problem for users or implementors.

Comments

@kaiogu
Copy link
Contributor

kaiogu commented Nov 25, 2020

Rasa version:
2.0.6
Rasa SDK version (if used & relevant):

Rasa X version (if used & relevant):

Python version:
3.8.0
Operating system (windows, osx, ...):
ubuntu 18.04
Issue:
Arguments stated to be optional by the rasa data convert xxx help are not actually optional.

Error (including full traceback):

❯ rasa data convert nlu
usage: rasa data convert nlu [-h] [-v] [-vv] [--quiet] -f {json,md,yaml} --data DATA --out OUT [-l LANGUAGE]
rasa data convert nlu: error: the following arguments are required: -f/--format, --data, --out

Contrast this with the help of the same command in which these arguments are stated to be optional and to have defaults:

❯ rasa data convert nlu --help
usage: rasa data convert nlu [-h] [-v] [-vv] [--quiet] -f {json,md,yaml} --data DATA --out OUT [-l LANGUAGE]

optional arguments:
  -h, --help            show this help message and exit
  -f {json,md,yaml}, --format {json,md,yaml}
                        Output format the training data should be converted into. Note: currently training data can be
                        converted to 'yaml' format only from 'md' format (default: yaml)
  --data DATA           Path to the file or directory containing Rasa NLU data. (default: data)
  --out OUT             File (for `json` and `md`) or existing path (for `yaml`) where to save training data in Rasa
                        format. (default: converted_data)
  -l LANGUAGE, --language LANGUAGE
                        Language of data. (default: en)

Command or request that led to error:

❯ rasa data convert nlu
❯ rasa data convert nlg
❯ rasa data convert core

Content of configuration file (config.yml) (if relevant):

Content of domain file (domain.yml) (if relevant):

Definition of Done
For all rasa data convert commands:

  • set required=False (or don't set it) if a default was provided
@kaiogu kaiogu added area:rasa-oss 🎡 Anything related to the open source Rasa framework type:bug 🐛 Inconsistencies or issues which will cause an issue or problem for users or implementors. labels Nov 25, 2020
@sara-tagger
Copy link
Collaborator

Thanks for the issue, @amn41 will get back to you about it soon!

You may find help in the docs and the forum, too 🤗

@joejuzl joejuzl added the area:rasa-oss/cli Issues focused on the rasa command-line-interface label Jan 28, 2021
@TyDunn TyDunn added the feature:ux-cli+training-data Feature: Improve user experience with Rasa CLI and training data for developers label Feb 17, 2021
@TyDunn TyDunn removed the feature:ux-cli+training-data Feature: Improve user experience with Rasa CLI and training data for developers label May 5, 2021
@wochinge
Copy link
Contributor

wochinge commented Jun 3, 2021

The issue is that we mark things as required but give them defaults at the same type. Argparse treats everything with a default as required=False as optional but then still fails if not provided 🤦🏻

@TyDunn TyDunn added the effort:atom-squad/1 Label which is used by the Rasa Atom squad to do internal estimation of task sizes. label Jun 4, 2021
@wochinge wochinge assigned ghost Aug 16, 2021
@ghost ghost assigned usc-m and unassigned ghost Aug 18, 2021
@wochinge wochinge closed this as completed Sep 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:rasa-oss/cli Issues focused on the rasa command-line-interface area:rasa-oss 🎡 Anything related to the open source Rasa framework effort:atom-squad/1 Label which is used by the Rasa Atom squad to do internal estimation of task sizes. type:bug 🐛 Inconsistencies or issues which will cause an issue or problem for users or implementors.
Projects
None yet
Development

No branches or pull requests

6 participants