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

Only override the name of a Parameterized instance on Parameter instantiation when instantiate=True #938

Merged
merged 2 commits into from
May 15, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion param/parameterized.py
Original file line number Diff line number Diff line change
Expand Up @@ -2103,7 +2103,7 @@ def _instantiate_param(self_, param_obj, dict_=None, key=None, deepcopy=True):

dict_[key] = new_object

if isinstance(new_object, Parameterized):
if isinstance(new_object, Parameterized) and deepcopy:
global object_count
object_count += 1
# Writes over name given to the original object;
Expand Down
Loading