Skip to content

Commit

Permalink
(core) minor adjustment to report if all _downloadable_ models were d…
Browse files Browse the repository at this point in the history
…ownloaded. Previously, not downloading custom-defined model was giving user a warning
  • Loading branch information
amkrajewski committed Feb 17, 2024
1 parent e1be553 commit b36330a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pysipfenn/core/pysipfenn.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ def downloadModels(self, network: str = 'all') -> None:
# Fetch all
if network == 'all':
print('Fetching all networks!')
downloadableNets = [net for net in self.network_list if 'URL_ONNX' in self.models[net]]
for net in self.network_list:
if net not in self.network_list_available:
if 'URL_ONNX' in self.models[net]:
Expand All @@ -236,8 +237,8 @@ def downloadModels(self, network: str = 'all') -> None:
print(f'{net} not detected on disk and ONNX URL has not been provided.')
else:
print(f'{net} detected on disk. Ready to use.')
if self.network_list == self.network_list_available:
print('All networks available!')
if downloadableNets == self.network_list_available:
print('All downloadable networks are now available!')
else:
print('Problem occurred.')

Expand Down

0 comments on commit b36330a

Please sign in to comment.