Skip to content

Commit

Permalink
Add arguments to cli to allow disabling of copying image data from sh…
Browse files Browse the repository at this point in the history
…are mount (#3544)
  • Loading branch information
shortcipher3 authored Aug 16, 2021
1 parent 22bdb94 commit 589dc91
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
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

0 comments on commit 589dc91

Please sign in to comment.