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

Add arguments to cli to disabling copying image data in share #3544

Merged
merged 1 commit into from
Aug 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- Added ability to import data from share with cli without copying the data (<https://github.com/openvinotoolkit/cvat/issues/2862>)
- Notification if the browser does not support nesassary API
- Added ability to export project as a dataset (<https://github.com/openvinotoolkit/cvat/pull/3365>)
- Additional inline tips in interactors with demo gifs (<https://github.com/openvinotoolkit/cvat/pull/3473>)
Expand Down
4 changes: 4 additions & 0 deletions utils/cli/core/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ def tasks_data(self, task_id, resource_type, resources, **kwargs):
data['image_quality'] = kwargs.get('image_quality')
if 'frame_step' in kwargs:
data['frame_filter'] = f"step={kwargs.get('frame_step')}"
if 'copy_data' in kwargs:
data['copy_data'] = kwargs.get('copy_data')
if 'use_cache' in kwargs:
data['use_cache'] = kwargs.get('use_cache')

response = self.session.post(url, data=data, files=files)
response.raise_for_status()
Expand Down
13 changes: 13 additions & 0 deletions utils/cli/core/definition.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,19 @@ def argparse(s):
help='''set the frame step option in the advanced configuration
when uploading image series or videos (default: %(default)s)'''
)
task_create_parser.add_argument(
'--copy_data',
default=False,
action='store_true',
help='''set the option to copy the data, only used when resource type is
share (default: %(default)s)'''
)
task_create_parser.add_argument(
'--use_cache',
default=True,
action='store_false',
help='''set the option to use the cache (default: %(default)s)'''
)
#######################################################################
# Delete
#######################################################################
Expand Down