-
Notifications
You must be signed in to change notification settings - Fork 110
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 ScalarParameters replacing GenKW in parameter config #10095
base: main
Are you sure you want to change the base?
Conversation
CodSpeed Performance ReportMerging #10095 will not alter performanceComparing Summary
|
8d7051d
to
33ef660
Compare
|
||
|
||
@dataclass | ||
class TransUnifSettings: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: All distributions should contain LOG10 property
This will be handled directly by the type of distribution.
src/ert/config/scalar_parameter.py
Outdated
if group_name not in transformed_dict: | ||
transformed_dict[group_name] = {} | ||
transformed_dict[group_name][param_name] = transformed_value | ||
# todo log handling when distribution requires it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: here is also the place that we need to handle template_file / output_file!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First draft of the treatment of template / output file is in place.
80c5e43
to
1db64b4
Compare
] | ||
) | ||
|
||
def save_parameters( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: redesign API for save_parameters?
096cbc4
to
ebef6f6
Compare
) | ||
) | ||
# TODO refactor this test | ||
# @pytest.mark.parametrize( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Get rid of most of it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The best tests are the ones that are removed :)
80bc01b
to
ddcf1e0
Compare
- transformations become dataclases -> TODO: pydantic - ScalarParameter represents a single parameter instance with a datasource (DESIGN_MATRIX, SAMPLED) - all ScalarParameter instances are bound by ScalarParameters(ParameterConfig) and are stored for all realizations in a single pl.Dataframe (parquet) file. - API to load / save scalar parameters is in local_ensemble load|save_param_scalar - DESIGN_MATRIX now creates only ScalarParameters instances and modifies the ScalarParameterc Config. - Reimplement load_all_gen_kwn_data
❌ 13 Tests Failed:
View the top 3 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think the tests are all that happy 🌧️
if isinstance(config_node, ScalarParameters): | ||
return config_node.load_parameters_to_update(ensemble, iens_active_index) | ||
dataset = config_node.load_parameters(ensemble, param_group, iens_active_index) | ||
assert isinstance(dataset, np.ndarray), "dataset is not an numpy array" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we keeping this assertion?
|
||
if TYPE_CHECKING: | ||
from ert.config import ParameterConfig | ||
pass |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can remove this TYPE_CHECKING
@@ -180,12 +182,12 @@ def hasNodeGenData(self, key: str) -> bool: | |||
config = self.response_configs["gen_data"] | |||
return key in config.keys | |||
|
|||
# TODO: This might not be needed but it retrieves the group names for genkw config |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this still needed?
) | ||
) | ||
# TODO refactor this test | ||
# @pytest.mark.parametrize( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The best tests are the ones that are removed :)
Issue
Resolves #10088
Approach
- transformations become dataclases -> TODO: pydantic
- ScalarParameter represents a single parameter instance with a
datasource (DESIGN_MATRIX, SAMPLED)
- all ScalarParameter instances are bound by
ScalarParameters(ParameterConfig) and are stored for all realizations
in a single pl.Dataframe (parquet) file.
- API to load / save scalar parameters is in local_ensemble load|save_param_scalar
- DESIGN_MATRIX now creates only ScalarParameters instances and
modifies the ScalarParameterc Config.
git rebase -i main --exec 'just rapid-tests'
)When applicable