-
Notifications
You must be signed in to change notification settings - Fork 2
bug: model_variable lost during CMORizer rule expansion with DefaultPipeline #262
Copy link
Copy link
Open
Description
Problem
When using DefaultPipeline with a config that sets model_variable: "temp" and cmor_variable: "thetao", the get_variable pipeline step fails with:
KeyError: "No variable named 'thetao'. Variables on the dataset include ['temp', ...]"
The model_variable attribute is correctly set during Rule.from_dict() (verified locally), but by the time get_variable runs, rule_spec.model_variable returns "thetao" (the cmor_variable) instead of "temp".
Reproduction
Happens in CI with the pycmor-test-data-fesom external package's config_cmip6_fesom_2p6.yaml:
rules:
- name: "thetao_with_levels"
cmor_variable: "thetao"
model_variable: "temp"
pipelines:
- default
pipelines:
- name: default
uses: pycmor.core.pipeline.DefaultPipelineHypothesis
The model_variable dynamic attribute is likely lost during one of:
_rules_expand_drvs()-- creates new Rule objects via deep copy_rules_depluralize_drvs()-- may reconstruct rules- Rule pickling/unpickling through Prefect task submission
Context
Discovered during #253 integration testing. All fesom_2p6 tests with DefaultPipeline fail. This is pre-existing behavior -- the external package is the first to exercise DefaultPipeline end-to-end with model_variable != cmor_variable.
Related
- PR feat: test infrastructure + tutorial dataset system #253 (test infrastructure + tutorial system)
- External package: https://github.com/FESOM/pycmor_test_data
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels