Skip to content

evaluate_performance should actually use the parameter num_samples#166

Merged
dimkab merged 4 commits intomainfrom
db-evaluate-nsamples-fix
Jun 9, 2025
Merged

evaluate_performance should actually use the parameter num_samples#166
dimkab merged 4 commits intomainfrom
db-evaluate-nsamples-fix

Conversation

@dimkab
Copy link
Copy Markdown
Collaborator

@dimkab dimkab commented Jun 3, 2025

No description provided.

@dimkab dimkab requested a review from Copilot June 5, 2025 02:44
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes a hardcoded sample size in evaluate_performance by using the num_samples parameter.

  • Updated the Predictive call to pass through num_samples instead of always using 1000.
  • Preserved the parallel=True behavior unchanged.
Comments suppressed due to low confidence (2)

collab/foraging/toolkit/evaluate.py:11

  • Update the function docstring to reflect that num_samples is now actually used when instantiating Predictive, and adjust the default description if needed.
predictive = Predictive(

collab/foraging/toolkit/evaluate.py:12

  • Add or update a unit test to verify that passing a custom num_samples value actually changes the number of samples used by Predictive.
    model=model, guide=guide, num_samples=num_samples, parallel=True

@dimkab dimkab requested a review from tommybotch June 5, 2025 03:36
Copy link
Copy Markdown
Contributor

@tommybotch tommybotch left a comment

Choose a reason for hiding this comment

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

looks good!

@dimkab dimkab merged commit 4fc1af6 into main Jun 9, 2025
3 checks passed
@dimkab dimkab deleted the db-evaluate-nsamples-fix branch June 9, 2025 13:51
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