Skip to content

Conversation

@Lunderberg
Copy link
Contributor

Prior to this commit, the BundleModelParams would replace model parameters with param_tuple[index] within expressions. These nested expressions would then be normalized, resulting in gv = param_tuple[index] or lv = param_tuple[index] variable definitions. These auto-generated gv and lv names make it quite difficult to determine which model parameter is being used.

This commit updates the BundleModelParams transform to explicitly produce the bound variable, orig_param_name = param_tuple[index], preserving human-readable names from the parameters.

Prior to this commit, the `BundleModelParams` would replace model parameters
with `param_tuple[index]` within expressions.  These nested
expressions would then be normalized, resulting in `gv =
param_tuple[index]` or `lv = param_tuple[index]` variable
definitions.  These auto-generated `gv` and `lv` names make it quite
difficult to determine which model parameter is being used.

This commit updates the `BundleModelParams` transform to explicitly
produce the bound variable, `orig_param_name = param_tuple[index]`,
preserving human-readable names from the parameters.
Copy link
Contributor

@slyubomirsky slyubomirsky left a comment

Choose a reason for hiding this comment

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

Excellent quality-of-life improvement, thanks a ton.

@Lunderberg Lunderberg merged commit fab6db2 into apache:unity Jan 8, 2024
@Lunderberg Lunderberg deleted the unity_keep_parameter_name_when_bundling branch January 8, 2024 22:06
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.

2 participants