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

Prevent list of trained model names from having repeats #839

Merged
merged 2 commits into from
Feb 13, 2024

Conversation

landoskape
Copy link
Contributor

@landoskape landoskape commented Dec 8, 2023

In add_model() of the io module, the list of user model_names is appended to with the new name, even if it already existed. This is confusing, because in the select custom model section of the GUI, it will repeat the name, even though only one model under that name already exists. This corrects that by checking if the fname of the new model exists in models.get_user_models() before adding it.

Copy link

codecov bot commented Dec 8, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (4f56619) 63.41% compared to head (ecad632) 63.50%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #839      +/-   ##
==========================================
+ Coverage   63.41%   63.50%   +0.09%     
==========================================
  Files          14       14              
  Lines        2971     2976       +5     
==========================================
+ Hits         1884     1890       +6     
+ Misses       1087     1086       -1     

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

@carsen-stringer carsen-stringer merged commit 3e8f27a into MouseLand:main Feb 13, 2024
15 checks passed
@carsen-stringer
Copy link
Member

thanks!

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