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

feat: Add argument img_folder to OpenFire #34

Merged
merged 6 commits into from
Sep 25, 2020

Conversation

blenzi
Copy link

@blenzi blenzi commented Oct 22, 2019

Following the discussion in #26, add argument img_folder (str or Path) to OpenFire. If not given, the default <root>/OpenFire/images is used. The rest of the folder structure is kept for the moment.

test_datasets.py now tests its type and also if the download succeeded approximately: up to 10 samples can be missing.

Following the discussion in pyronear#26, add argument  (str or Path) to OpenFire. If not given, the default  is used. The rest of the folder structure is kept for the moment.

test_datasets.py now tests its type and also if the download succeeded approximately: up to 10 samples can be missing.
@blenzi blenzi requested a review from frgfm October 22, 2019 11:26
@codecov
Copy link

codecov bot commented Oct 22, 2019

Codecov Report

Merging #34 into master will increase coverage by 0.27%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #34      +/-   ##
==========================================
+ Coverage   86.25%   86.53%   +0.27%     
==========================================
  Files          21       21              
  Lines         866      869       +3     
==========================================
+ Hits          747      752       +5     
+ Misses        119      117       -2     
Flag Coverage Δ
#unittests 86.53% <100.00%> (+0.27%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pyronear/datasets/openfire.py 90.90% <100.00%> (+1.71%) ⬆️
pyronear/datasets/utils.py 93.05% <0.00%> (+1.38%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8116724...79a5e23. Read the comment docs.

test/test_datasets.py Outdated Show resolved Hide resolved
Copy link
Member

@frgfm frgfm left a comment

Choose a reason for hiding this comment

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

Great PR!
Just a little edit for good pep8 compliance if you don't mind

test/test_datasets.py Outdated Show resolved Hide resolved
@frgfm frgfm self-assigned this Oct 22, 2019
@frgfm frgfm added type: enhancement New feature or request module: datasets Related to datasets labels Oct 22, 2019
@frgfm frgfm added this to the 0.1.0 milestone Oct 22, 2019
Following comments on pyronear#32:
- Avoiding long lines, also splitting if / else in OpenFire c-tor
- Changing style and adding test on default img_folder value in test_datasets.py
frgfm
frgfm previously approved these changes Oct 23, 2019
Copy link
Member

@frgfm frgfm left a comment

Choose a reason for hiding this comment

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

Very useful PR to symlink image folder located elsewhere for training!
A few extra tests will have to be added to unittests to monitor further developments of OpenFire but this one is working as is.

Adding argument --img-folder to fastai/train.py and torch/train.py
@frgfm
Copy link
Member

frgfm commented May 12, 2020

@blenzi Just checking, is this still on? Or was it covered by another PR recently?
If no longer relevant, would you mind closing the PR please?

This branch remained idle for a long time.
Trying to merge with frgfm/master. Short summary of new features:

- Adding argument img_folder to OpenFire c-tor, stored in img_folder attribute (default to  previous value: root/OpenFire/images) and returned by _images property
- Adding argument --img-folder to fastai/train.py and torch/train.py
- Associated tests
frgfm
frgfm previously approved these changes May 22, 2020
Copy link
Member

@frgfm frgfm left a comment

Choose a reason for hiding this comment

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

Thanks for clearing the PR! Looks good to me

@x0s
Copy link
Contributor

x0s commented Jun 3, 2020

@blenzi : Do you need any help to resolve the conflicts ?

@blenzi
Copy link
Author

blenzi commented Jun 3, 2020

@blenzi : Do you need any help to resolve the conflicts ?

Thanks @x0s. I didn't check it yet and will not be able to do in the next day or two. If you want, please go ahead!

@frgfm
Copy link
Member

frgfm commented Sep 18, 2020

Mind trying to solve the conflicts @blenzi 🙏 ? (the scripts were moved, just need some fixing)

Bruno Lenzi added 2 commits September 25, 2020 17:49
In test_datasets.py/DatasetsTester.test_openfire: allow up to 15 failed downloads instead of 10
@frgfm frgfm modified the milestones: 0.1.0, 0.1.1 Sep 25, 2020
Copy link
Member

@frgfm frgfm left a comment

Choose a reason for hiding this comment

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

Thanks for fixing the PR!

@blenzi blenzi merged commit 07e212a into pyronear:master Sep 25, 2020
@blenzi blenzi deleted the OpenFire_img_folder branch September 25, 2020 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: datasets Related to datasets type: enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants