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

Donwload model only when needed #200

Merged
merged 10 commits into from
May 29, 2024
Merged

Donwload model only when needed #200

merged 10 commits into from
May 29, 2024

Conversation

RonanMorgan
Copy link
Collaborator

This code is :

  • creating a meadata file with the hash of the model if this doesn't exist
  • if already existing , it compares the hash downloaded and the hash of the file
  • if the file doesn't exist or the hash are different it will download the new model

TODO : we still need to create a new path name in huggingface space in order to have a "neutral name" (like pyronear/model.onnx) and not having to change the value in the code each time @MateoLostanlen

@RonanMorgan RonanMorgan self-assigned this May 22, 2024
Copy link

codecov bot commented May 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.91%. Comparing base (c18de6b) to head (0acd8d5).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #200      +/-   ##
===========================================
+ Coverage    87.84%   88.91%   +1.07%     
===========================================
  Files            6        6              
  Lines          362      397      +35     
===========================================
+ Hits           318      353      +35     
  Misses          44       44              
Flag Coverage Δ
unittests 88.91% <100.00%> (+1.07%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@MateoLostanlen MateoLostanlen left a comment

Choose a reason for hiding this comment

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

Hi Ronan, this looks togood to me. Just can you change the model path and hash based on PR #202

@MateoLostanlen MateoLostanlen merged commit 347acca into develop May 29, 2024
14 checks passed
@MateoLostanlen MateoLostanlen deleted the rs/check-hash-model branch May 29, 2024 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants