-
Notifications
You must be signed in to change notification settings - Fork 412
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
feat: add datasets delete
command
#3703
Conversation
Codecov ReportPatch coverage is
📢 Thoughts on this report? Let us know!. |
The URL of the deployed environment for this PR is https://argilla-quickstart-pr-3703-ki24f765kq-no.a.run.app |
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, just some minor comments/questions
|
||
try: | ||
dataset.delete() | ||
except RuntimeError 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.
Here we can also handle PermissionError
which is raised by allow_for_roles
decorator if the user doesn't have owner
role
return_value=remote_feedback_dataset, | ||
) | ||
|
||
result = cli_runner.invoke(cli, "datasets --name my-dataset push-to-huggingface") |
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.
With the current approach for the CLI as datasets [NAME] [WORKSPACE] [CMD] [ARGS]
shouldn't we make CMD
show the --help
by default? Or do we want it to fail if no args are provided? I guess it would depend on whether we have commands without args or not, right?
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 mean whether we should include no_args_is_help=True
the the CMD e.g. push-to-huggingface
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.
ah, I see! I think it's better to not show by default the --help
Co-authored-by: Alvaro Bartolome <[email protected]>
…om/argilla-io/argilla into feature/cli-delete-dataset-command
Description
This PR adds a new command
datasets delete
that allows to deleteFeedbackDataset
s. In addition, a custom callback has been added for the group of commandsdatasets
in which a--name
and a--workspace
can be provided to load aFeedbackDataset
that will be used for an operation. Apart from that, thepush-to-hugginface
command has been updated to display an spinner.Closes #3691
Type of change
How Has This Been Tested
In a local development environment:
python -m argilla datasets --name feedback-dataset --workspace gabriel delete
: deletes theFeedbackDataset
successfully.Checklist
CHANGELOG.md
file (See https://keepachangelog.com/)