Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Improve examples #3091
base: develop
Are you sure you want to change the base?
Improve examples #3091
Changes from 14 commits
caba61c
db4868e
63fdf19
9989bb5
940bdf8
7b71cf7
3c963e9
427d2cd
1c9260d
74e90a7
ed5a6fa
7b68c20
37d34c2
042ca6f
23d8ba3
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why
datasets/**
was removed?In case of the running tests locally,
datasets
directory may appear and be unintentionally committed.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
datasets
directory created by ultralitics, it's only happens if you have yolo config.config/Ultralytics/settings.json
file that was generated some time ago or changes manually.On current version of yolo, default path for
datasets_dir
generated asnncf/../datasest
if run example from NNCF in case of.config/Ultralytics/settings.json
is not exist.If datasets directory created on your host you need to modify config by
yolo settings dataset_dir=new_path
or by text editor, or remove config file after it will be generated this new path.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not agree.
I've run the following command from the
nncf
root (as usual, for testing purposes):pytest -s tests/cross_fw/examples/test_examples.py -k "post_training_quantization_openvino_yolo8_quantize"
And after the passing, I observe the following directory:
Thus, removing
datasets/**
from the.gitignore
might cause issues.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From a high perspective, it would be more helpful if you would update examples to create a
datasets
folder during the run in a corresponding or temporary directory, to exclude incidents in the future. In this case, we would be able to remove this path from.gitignore
and safely run tests.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you updated the ultralytics config file as described above?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. I did nothing with the
ultralytics
package. I've reproduced simple scenario with the following steps:From the contributor's perspective, I would not even know anything about
ultralytics
managing at all.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You have config file
~/.config/Ultralytics/settings.json
on your host that was generated when you run any code with ultralitics for the first time and creating or removing any virtual environment does not affect on the config in any way.Your config collect line like
"datasets_dir": "/home/<username>/nncf/datasets",
.This line only generated if run NNCF examples with old version of ultralitics, current default value is like
/home/<username>/datasets
-GIT_ROOT.parent / "datasets"
.There is only one way conditions to get
datasets_dir
like.../nncf/datasets
:In all other cases
datasets_dir
will not set asnncf/datasets
My point, If you have config file of any third party package with not default values in your
~/.config
directory, that used NNCF folder as storage for anything, it's not responsibility of NNCF, it's incorrect configuration that should be resolved by user.Moreover, the
datasets
directory in the NNCF git root folder breaksisort
, by changing the import order ofdatasets
module.So
datasets
in.gitignore
hides this problem by making the existence of this directory expected but it is not.@alexsu52 as you have added
datasets
to.gitignore
, i think last word is yourThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I run NNCF tests from the root and NNCF creates a
datasets
folder in the root, this is NNCF's responsibility, not the user, since it is not possible to set up the folder for this via tests.As you said,
So, this is another reason to change the placing of the
datasets
folder on the NNCF's side, since tests were designed by the NNCF team.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I read your discussion and did the following experiment:
~/.config/Ultralytics/settings.json
Ultralytics version:
dataset was downloaded into
nncf/datasets
Where did I go wrong?