Skip to content

Commit

Permalink
Merge pull request #35 from tomas-gajarsky/hotfix/test_detector_downl…
Browse files Browse the repository at this point in the history
…oader

Hotfix/test detector downloader
  • Loading branch information
tomas-gajarsky authored Feb 2, 2023
2 parents b8fc7a2 + 82c7bb1 commit 890cb7e
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
notebooks/** linguist-vendored
*.mako linguist-vendored
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Change Log


## 0.2.3

Released on February 2, 2023.

### Fixed
* error in detector test

### Removed
* deletion of detector model in tests


## 0.2.2

Released on January 28, 2023.
Expand Down
2 changes: 1 addition & 1 deletion conf/analyzer/detector/retinaface.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ _target_: facetorch.analyzer.detector.FaceDetector

downloader:
_target_: facetorch.downloader.DownloaderGDrive
file_id: 154x2VjmTQVqmowB0yZw4Uck7uQs2vVBs # str
file_id: 1eMuOdGkiNCOUTiEbKKoPCHGCuDgiKeNC # str
path_local: /opt/facetorch/models/torchscript/detector/1/model.pt # str

device:
Expand Down
2 changes: 0 additions & 2 deletions tests/test_detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
@pytest.mark.detector
@pytest.mark.downloader
def test_downloader_run(analyzer):
if os.path.exists(analyzer.detector.downloader.path_local):
os.remove(analyzer.detector.downloader.path_local)
analyzer.detector.downloader.run()
assert os.path.exists(analyzer.detector.downloader.path_local)

Expand Down
3 changes: 2 additions & 1 deletion tests/test_predictors.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ def test_downloaders_run(analyzer):
for predictor in analyzer.predictors.values():
# if os.path.exists(predictor.downloader.path_local):
# os.remove(predictor.downloader.path_local)
predictor.downloader.run()
if not os.path.exists(predictor.downloader.path_local):
predictor.downloader.run()
assert os.path.exists(predictor.downloader.path_local)


Expand Down
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.2.2
0.2.3

0 comments on commit 890cb7e

Please sign in to comment.