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 overlap & segment_size flag for python cli task create #1950

Merged

Conversation

foreverYoungGitHub
Copy link
Contributor

@foreverYoungGitHub foreverYoungGitHub commented Jul 28, 2020

Motivation and context

Allow users to create the cvat task with multiple jobs through cvat python cli.

How has this been tested?

Since cli tools does not have the automatic test, I directly test it with my own task.

The task create with default param:
image

The task create with --overlap=0 --segment_size=31:
image

Checklist

License

  • I submit my code changes under the same MIT License that covers the project.
    Feel free to contact the maintainers if that's a concern.
  • I have updated the license header for each file (see an example below)
# Copyright (C) 2020 Intel Corporation
#
# SPDX-License-Identifier: MIT

@bsekachev
Copy link
Member

@foreverYoungGitHub

Hi, thx for the contribution
Could you please resolve conflicts?

@azhavoro
Copy link
Contributor

@foreverYoungGitHub Thanks again for the PR, could you please fix tests and update changelog?

ERROR: test_tasks_dump (tests._test_cli.TestCLI)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.5/unittest/mock.py", line 1157, in patched
    return func(*args, **keywargs)
  File "/home/django/utils/cli/tests/_test_cli.py", line 32, in setUp
    [self.img_file])
TypeError: tasks_create() missing 2 required positional arguments: 'resource_type' and 'resources'

@foreverYoungGitHub
Copy link
Contributor Author

@azhavoro, Sorry for the error message in the test, should be fine for now.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 6658

  • 3 of 3 (100.0%) changed or added relevant lines in 2 files are covered.
  • 7 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.03%) to 64.987%

Files with Coverage Reduction New Missed Lines %
cvat/apps/engine/task.py 1 76.95%
cvat/apps/engine/media_extractors.py 6 75.81%
Totals Coverage Status
Change from base Build 6627: -0.03%
Covered Lines: 11099
Relevant Lines: 16677

💛 - Coveralls

@bsekachev bsekachev merged commit 3f6d2e9 into cvat-ai:develop Jul 29, 2020
@bsekachev
Copy link
Member

@foreverYoungGitHub Thanks you so much

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants