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

Make progressbar optional in frontiers checks #115

Merged
merged 2 commits into from
Jun 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion pastastore/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,7 @@ def frontiers_checks(
check4_gain: bool = True,
check5_parambounds: bool = False,
csv_dir: Optional[str] = None,
progressbar: bool = False,
) -> pd.DataFrame: # pragma: no cover
"""Check models in a PastaStore to see if they pass reliability criteria.

Expand Down Expand Up @@ -597,6 +598,8 @@ def frontiers_checks(
csv_dir : string, optional
directory to store CSV file with overview of checks for every
model, by default None which will not store results
progressbar : bool, optional
show progressbar, by default False

Returns
-------
Expand Down Expand Up @@ -629,7 +632,9 @@ def frontiers_checks(
else:
models = pstore.model_names

for mlnam in tqdm(models, desc="Running model diagnostics"):
for mlnam in (
tqdm(models, desc="Running model diagnostics") if progressbar else models
):
ml = pstore.get_models(mlnam)

if ml.parameters["optimal"].hasnans:
Expand Down
Loading