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

Expand the DAG resampling #20

Merged
merged 6 commits into from
Jul 9, 2024
Merged

Expand the DAG resampling #20

merged 6 commits into from
Jul 9, 2024

Conversation

jeremykubica
Copy link
Contributor

Two changes to improve how the parameter sampling works:

  • Parameters are sampled in the order in which they are added (by changing the dictionary to a list). This allows for dependencies among the parameters.
  • An EffectModel can have and resample functional parameters.

@jeremykubica jeremykubica requested a review from OliviaLynn July 9, 2024 15:13
Copy link
Member

@OliviaLynn OliviaLynn left a comment

Choose a reason for hiding this comment

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

This looks great!

@@ -123,28 +125,28 @@ def sample_parameters(self, max_depth=50, **kwargs):
raise ValueError(f"Maximum sampling depth exceeded at {self}. Potential infinite loop.")

# Run through each parameter and sample it based on the given recipe.
for param, value in self.setters.items():
for name, source_type, setter in self.setters:
Copy link
Member

@OliviaLynn OliviaLynn Jul 9, 2024

Choose a reason for hiding this comment

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

I especially like how this block turned out!

@jeremykubica jeremykubica merged commit ea30c94 into main Jul 9, 2024
4 checks passed
@jeremykubica jeremykubica deleted the dag_expansion branch July 9, 2024 22:16
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