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

Add source field into ParameterConfig to indicate data source #10105

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

xjules
Copy link
Contributor

@xjules xjules commented Feb 18, 2025

Design matrix genkw looks to be sampled, which is not an issue as it gets overwritten right after sampling with the DM values.
This should prevent DM to be sampled.

Can be discussed if it is necessary.

Approach
Short description of the approach

(Screenshot of new behavior in GUI if applicable)

  • PR title captures the intent of the changes, and is fitting for release notes.
  • Added appropriate release note label
  • Commit history is consistent and clean, in line with the contribution guidelines.
  • Make sure unit tests pass locally after every commit (git rebase -i main --exec 'just rapid-tests')

When applicable

  • When there are user facing changes: Updated documentation
  • New behavior or changes to existing untested code: Ensured that unit tests are added (See Ground Rules).
  • Large PR: Prepare changes in small commits for more convenient review
  • Bug fix: Add regression test for the bug
  • Bug fix: Create Backport PR to latest release

@xjules xjules self-assigned this Feb 18, 2025
Copy link

codspeed-hq bot commented Feb 18, 2025

CodSpeed Performance Report

Merging #10105 will not alter performance

Comparing xjules:dont_sample_dm (4cd167f) with main (20dff0f)

Summary

✅ 25 untouched benchmarks

@xjules xjules marked this pull request as ready for review February 18, 2025 17:20
@@ -198,8 +198,11 @@ def sample_prior(
parameters = list(parameter_configs.keys())
for parameter in parameters:
config_node = parameter_configs[parameter]
if config_node.forward_init:
if config_node.forward_init or (
type(config_node) == GenKwConfig and config_node.design
Copy link
Collaborator

Choose a reason for hiding this comment

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

Think this logic would be simpler if we used something like source instead, also for the future, something like:

ParameterSource(StrEnum):
    forward_init = auto()
    sampled = auto()
    design_matrix = auto()

Copy link
Contributor Author

@xjules xjules Feb 19, 2025

Choose a reason for hiding this comment

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

Good! Will change correspondingly.

@@ -46,11 +47,17 @@ def parse_config(
return args, kwargs


class ParameterSource(StrEnum):
forward_init = auto()
Copy link
Collaborator

Choose a reason for hiding this comment

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

This should be changed to: user_provided, and we need to keep forward_init as is

@xjules xjules changed the title Add design field into GenKw to indicate no sampling for design matrix Add source field into ParameterConfig to indicate data source Feb 19, 2025
@xjules
Copy link
Contributor Author

xjules commented Feb 19, 2025

On hold ....

@xjules xjules added the blocked label Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

2 participants