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

Shared param test #180

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

hellkite500
Copy link
Member

Test to validate that the ngen module _params_as_df will ensure that any parameters with the same name end up mapping to the same permuted value.

@hellkite500 hellkite500 force-pushed the shared-param-test branch 2 times, most recently from ae06396 to f5c7f72 Compare August 27, 2024 21:32
@hellkite500 hellkite500 mentioned this pull request Aug 28, 2024
else:
p = params.get(name, [])
df = pd.DataFrame([s.__dict__ for s in p])
df['model'] = name
df.rename(columns={'name':'param'}, inplace=True)
return df
return df.set_index('param')
Copy link
Member Author

Choose a reason for hiding this comment

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

Ugh. It is actually possible for this dataframe to be empty if called from _map_params_to_realization and there is a module in the realization which doesn't have any params from the config to map to it, in this case, the set_index here will fail

Copy link
Member Author

Choose a reason for hiding this comment

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

Also, I think this breaks search, since param is no longer a column when subset to update_config

search.py", line 168, in dds_set

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.

1 participant