You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm attempting to create a flexible configuration system for a machine learning project using hydra-zen, specifically for configuring observation layer initializers. My goal is to:
Set default initializers in the configuration
Allow runtime override of the initializer type
Allow runtime configuration of initializer parameters (e.g., standard deviation)
Could not override 'observation_layer.time_scale_init.stddev'.
To append to your config use +observation_layer.time_scale_init.stddev=0.5
Key 'stddev' is not in struct
full_key: observation_layer.time_scale_init.stddev
object_type=dict
Could not override 'observation_layer/time_scale_init/stddev'.
To append to your config use +observation_layer/time_scale_init/stddev=0.5
Key 'observation_layer/time_scale_init/stddev' not in 'Builds_main_fn'
full_key: observation_layer/time_scale_init/stddev
object_type=Builds_main_fn
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Context and Problem Description
I'm attempting to create a flexible configuration system for a machine learning project using hydra-zen, specifically for configuring observation layer initializers. My goal is to:
Specific Use Case
I want to be able to run configurations like:
python src/test.py \ observation_layer.x_dim=32 \ observation_layer.features=64 \ observation_layer.kernel_init=normal \ observation_layer.kernel_init.stddev=0.1or override other intializers at the same time:
python src/test.py \ observation_layer.x_dim=32 \ observation_layer.features=64 \ observation_layer.time_scale_init=normal \ observation_layer.time_scale_init.stddev=0.5 \ observation_layer.kernel_init=normal \ # override from lecun_normal observation_layer.kernel_init.stddev=0.1Current Implementation Attempt
which works when I do the following:
uv run src/test.py \ observation_layer.x_dim=32 \ observation_layer.features=64output:
likewise when I do:
uv run src/test.py \ observation_layer.x_dim=32 \ observation_layer.features=64 \ observation_layer.time_scale_init.stddev=0.5output:
Current Limitations
When attempting to override initializer parameters, I encounter errors like:
command 1:
uv run src/test.py \ observation_layer.x_dim=32 \ observation_layer.features=64 \ observation_layer.time_scale_init=normal \ observation_layer.time_scale_init.stddev=0.5output:
command 2:
uv run src/test.py \ observation_layer.x_dim=32 \ observation_layer.features=64 \ observation_layer.time_scale_init=normal \ +observation_layer.time_scale_init.stddev=0.5output (incorrectly stores the jax function):
command 3:
uv run src/test.py \ observation_layer.x_dim=32 \ observation_layer.features=64 \ observation_layer.time_scale_init=normal \ observation_layer/time_scale_init/stddev=0.5output:
command 4:
uv run src/test.py \ observation_layer.x_dim=32 \ observation_layer.features=64 \ observation_layer.time_scale_init=normal \ +observation_layer/time_scale_init/stddev=0.5output (again incorrectly/doesnt store the jax function):
Questions and Requests for Guidance
Beta Was this translation helpful? Give feedback.
All reactions