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

tools/downloader: align namespace #2723

Merged
merged 12 commits into from
Sep 24, 2021

Conversation

jkamelin
Copy link
Contributor

@jkamelin jkamelin commented Sep 2, 2021

This PR is to align OMZ tools namespace in OpenVINO Python environment. The tools will now be located under openvino.model_zoo namespace and accessible through command line as omz_downloader, omz_converter, omz_quantizer, omz_data_downloader and omz_info_dumper commands, just like it is in openvino-dev PyPi package starting from OpenVINO 2021.4 release

@github-actions github-actions bot added dependencies Any changes in any dependencies (new dep or its version) should be produced via Change Request on PM labels Sep 2, 2021
@vladimir-dudnik
Copy link
Contributor

@nignatovsky we probably need to make change in jenkins job to replace direct call to downloader.py with install it and call to omz_downloader ?

@jkamelin what do you think?

@jkamelin
Copy link
Contributor Author

jkamelin commented Sep 2, 2021

@nignatovsky we probably need to make change in jenkins job to replace direct call to downloader.py with install it and call to omz_downloader ?

@jkamelin what do you think?

I agree

@nignatovsky
Copy link
Contributor

@nignatovsky we probably need to make change in jenkins job to replace direct call to downloader.py with install it and call to omz_downloader ?

@jkamelin what do you think?

Yes, I will make necessary changes in the Downloader job

@helena-intel
Copy link

It is very welcome that the names are now aligned between pip and other installers! The README still seems to assume that a user needs to install open model zoo. Could it be clarified that that step is not necessary if a user already installed OpenVINO with pip, or OMZ tools with IRC? I find it useful to refer to the OMZ tools README for usage info about the tools (and people may arrive their when searching for how to use, say, omz_quantizer, but that installation step may lead people to think that they still have to do these steps too.

Also, not essential but IMO it would be nicer if the README was not under /tools/downloader/README. It suggests that it is mostly about downloader, instead of all the OMZ tools. Is it being considered to change that, now that these relatively big changes are being made?

Comment on lines 35 to 42
sudo apt-get install python3 python3-dev python3-setuptools python3-pip
```

2. Install the tools with the following command:

```sh
python3 setup.py build
python3 setup.py install

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These instructions are for Ubuntu only. On Windows, if you install Python with the installer from python.org (the recommended way to install Python on Windows), setuptools and pip are included (though they are not always at the latest version). But if you type python3 in a command prompt, you get redirected to the Windows Store to install Python. So on Windows you have to type python, but on Ubuntu, you have to type python3.

This is how the PyPI openvino-dev install docs do this: https://github.com/openvinotoolkit/openvino/blob/master/docs/install_guides/pypi-openvino-dev.md
For the notebooks we recommend a virtualenv and have different headings https://github.com/openvinotoolkit/openvino_notebooks/

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed command to python, added note about the difference on Linux

tools/model_tools/README.md Outdated Show resolved Hide resolved
tools/model_tools/setup.py Show resolved Hide resolved
@jkamelin
Copy link
Contributor Author

jkamelin commented Sep 8, 2021

It is very welcome that the names are now aligned between pip and other installers! The README still seems to assume that a user needs to install open model zoo. Could it be clarified that that step is not necessary if a user already installed OpenVINO with pip, or OMZ tools with IRC? I find it useful to refer to the OMZ tools README for usage info about the tools (and people may arrive their when searching for how to use, say, omz_quantizer, but that installation step may lead people to think that they still have to do these steps too.

Added note that OMZ tools can be installed as a part of OpenVINO and provided installation steps are used to install from source.

Also, not essential but IMO it would be nicer if the README was not under /tools/downloader/README. It suggests that it is mostly about downloader, instead of all the OMZ tools. Is it being considered to change that, now that these relatively big changes are being made?

Renamed folder /tools/downloader/ to /tools/model_tools/

omz_info_dumper = open_model_zoo.model_tools.info_dumper:main
omz_quantizer = open_model_zoo.model_tools.quantizer:main
omz_converter = openvino.model_zoo.omz_converter:main
omz_data_downloader = openvino.model_zoo.omz_data_downloader:main
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW, do we need to update documentation for openvino-dev package about a new tool omz_data_downloader?
https://github.com/openvinotoolkit/openvino/blob/master/docs/install_guides/pypi-openvino-dev.md

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes

@vladimir-dudnik
Copy link
Contributor

vladimir-dudnik commented Sep 8, 2021

@jkamelin precommit check failed
12:42:28 tools/accuracy_checker/accuracy_checker/annotation_converters/README.md: unknown/disallowed HTML element in ''
12:42:28 tools/accuracy_checker/accuracy_checker/annotation_converters/README.md: unknown/disallowed HTML element in ''

just rebase, I think @eaidova has fixed this in #2736

@vladimir-dudnik
Copy link
Contributor

@nignatovsky note, this PR also affect Demo validation job

@helena-intel
Copy link

What happens if a user installed OMZ according to the installation instructions and then a few months later installs openvino-dev, with a newer release? Is there a risk that their omz_downloader etc. then still points to a local directory (because that is earlier in the PATH) @slyubimt ? And is there a risk that things break in that case?

@slyubimt
Copy link

slyubimt commented Sep 8, 2021

What happens if a user installed OMZ according to the installation instructions and then a few months later installs openvino-dev, with a newer release? Is there a risk that their omz_downloader etc. then still points to a local directory (because that is earlier in the PATH) @slyubimt ? And is there a risk that things break in that case?

If we consider the options to install both the packages, this one and openvino-dev, last installed overwrites aliases like omz_downloader.

@vladimir-dudnik
Copy link
Contributor

Jenkins please retry a build

@ilya-lavrenov
Copy link
Contributor

BTW, why scripts have name omz_downloader.py etc while they already in openvino.model_zoo? See https://github.com/jkamelin/open_model_zoo/tree/jk/namespace/tools/model_tools/src/openvino/model_zoo

@vladimir-dudnik
Copy link
Contributor

@ilya-lavrenov names omz_downloader, omz_converter maintained for consistency with openvino-dev PyPi package in 2021.4. They will be called from command line in openvino-dev environment as omz_downloader. Names like simple downloader will look to generic in this case.

@jkamelin please rebase your branch

@github-actions github-actions bot added accuracy checker All about Accuracy Checker tool, issues demo Issues with demo results, performance and etc. documentation documentation updates, improvements and fixes model All about model, from enabling to issues labels Sep 13, 2021
@vladimir-dudnik
Copy link
Contributor

14:16:05 models/public/yolox-tiny/README.md: URL reference "../../../tools/downloader/README.md" target does not exist or is not a file

@vladimir-dudnik vladimir-dudnik mentioned this pull request Sep 13, 2021
2 tasks
@vladimir-dudnik
Copy link
Contributor

Jenkins please retry a build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accuracy checker All about Accuracy Checker tool, issues demo Issues with demo results, performance and etc. dependencies Any changes in any dependencies (new dep or its version) should be produced via Change Request on PM documentation documentation updates, improvements and fixes downloader All about model downloading and converting tools model All about model, from enabling to issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants