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

SDK Timeline #4827

Closed
connor11son opened this issue Aug 24, 2022 · 8 comments
Closed

SDK Timeline #4827

connor11son opened this issue Aug 24, 2022 · 8 comments
Assignees
Labels
duplicate This issue or pull request already exists question Further information is requested sdk/cli

Comments

@connor11son
Copy link

I was wondering if there is a status/timeline for the SDK?

@bsekachev bsekachev added the question Further information is requested label Aug 25, 2022
@zhiltsov-max
Copy link
Contributor

zhiltsov-max commented Aug 25, 2022

Hi! Thank you for the interest for this part of CVAT. I cannot provide any time estimates, but we are actively working on this feature, and a big part of functionality is already covered in the existing PRs: #4813, #4819. We'll publish PyPI packages as soon as we can.

Are there any specific requirements or other thoughts from your side, that you would like to discuss?

Related: #4637

@zhiltsov-max zhiltsov-max added duplicate This issue or pull request already exists sdk/cli labels Aug 25, 2022
@connor11son
Copy link
Author

Hi there,

I have seen that there is active development on the SDK in those branches, but the (understandable) lack of documentation makes installation difficult. I think for my particular case we will just end up writing our own wrapper around the API to do what we need, but if any help is needed with documentation I would be glad to help.

@zhiltsov-max
Copy link
Contributor

zhiltsov-max commented Aug 25, 2022

You can find development installation instructions here: https://github.com/opencv/cvat/blob/develop/cvat-sdk/developer_guide.md#how-to-generate-api . Basically, you need to know that there is a handwritten and an auto-generated parts. To generate the code, you need to do the following:

git clone https://github.com/opencv/cvat
cd cvat/

# Set up python
python -m virtualenv venv
. venv/bin/activate

# Install server and generator requirements
pip install -r cvat/requirements/development.txt
pip install -r cvat-sdk/gen/requirements.txt

# Obtain REST API schema
python manage.py spectacular --file schema.yml && mkdir -p cvat-sdk/schema/ && mv schema.yml cvat-sdk/schema/

# Generate SDK API code
cd cvat-sdk/
gen/generate.sh

# Install packages
cd ../
pip install -e cvat-sdk/ # '-e' if you want to edit the code without reinstalling the package
pip install -e cvat-cli/

After this, you'll be able to use both updated CLI and SDK. SDK tests and code examples are here: https://github.com/opencv/cvat/blob/develop/tests/python/sdk/test_tasks.py#L86

If you have an opportunity, please share what you think about the SDK API - both generated REST API wrappers (at cvat_sdk.api_client) and "normal" high-level (at cvat_sdk.core).

@connor11son
Copy link
Author

Thank you very much! Is there a base image from which I can start from and run the above?

@zhiltsov-max
Copy link
Contributor

No, currently there is no such image. The generated code relies on the latest develop branch changes on the server schema output, so you need to pull the develop branch.

@zhiltsov-max
Copy link
Contributor

Hi, we have published cvat-sdk and cvat-cli packages on PyPI. Install with pip install cvat-sdk cvat-cli.

@connor11son
Copy link
Author

Awesome, thank you very much. We will try it out today.

@connor11son
Copy link
Author

One thing: on the PyPI page it says that Python>=3.7 is needed, however the sdk will only work in 3.8 and above due to this line.

Related.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists question Further information is requested sdk/cli
Projects
None yet
Development

No branches or pull requests

3 participants