The current implementation does not isolate the MLBlock hyperparameters dictionary from the underlying primitive, allowing this to modify its content and leading to unexpected behaviors and bugs.
This isolation should be enforced by using deepcopy instead of a simple copy when returning the hyperparameters in the get_hyperparameters method, and by always accessing the hyperparameters through this method instead of directly when passing them to the underlying primitive.
The current implementation does not isolate the MLBlock hyperparameters dictionary from the underlying primitive, allowing this to modify its content and leading to unexpected behaviors and bugs.
This isolation should be enforced by using deepcopy instead of a simple copy when returning the hyperparameters in the
get_hyperparameters
method, and by always accessing the hyperparameters through this method instead of directly when passing them to the underlying primitive.