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

Small bug in samples class when retrieving items #790

Merged
merged 4 commits into from
Dec 20, 2024
Merged

Conversation

alina-muellenmeister
Copy link
Contributor

Description

Retrieving items from a samples object causes a Value Error ValueError: Index t invalid in samples.py in line 390.
Example: Retrieving an item in test_samples() in test_samples.py:

  outputs = get_outputs(0.2)
  resultsdir = tempdir/'samples_results'
  resultsdir.mkdir(exist_ok=True)
  s = ss.Samples.new(resultsdir, outputs, identifiers=["p_death"])
  s[0]

This was likely missed in the starsim 2.0 update and is fixed by updating from t to timevec.

@cliffckerr cliffckerr added this to the Version 2.2.1 milestone Dec 4, 2024
@alina-muellenmeister
Copy link
Contributor Author

Added an option to disable printing Zip files saved to..., as it disrupts the tqdm progress bars when running simulations with Celery workers on VMs (purely for aesthetic purposes ;))
image

@cliffckerr cliffckerr changed the base branch from main to rc2.3 December 20, 2024 21:27
@cliffckerr
Copy link
Contributor

Looks great, thank you!

@cliffckerr cliffckerr merged commit 76aff69 into rc2.3 Dec 20, 2024
3 checks passed
@cliffckerr cliffckerr deleted the samples_index_bug branch December 20, 2024 21:27
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.

3 participants