-
Notifications
You must be signed in to change notification settings - Fork 94
Open
Labels
needs-triageThis has been recently submitted and needs attentionThis has been recently submitted and needs attentionuser-reported
Description
What would you like to say?
In #1924, we chose to not use "default"
thinking that it was the same semantic than None
.
However, those two options have different semantics:
None
means that we do not change the backend"default"
means that we use the default backend set by theDisplay
It starts to matter in nested context. Right now, we are unable to reset a context to the default backend that would be equivalent to:
with config_context(plot_backend="default"):
with config_context(plot_backend="plotly"):
print(get_config()["plot_backend"])
We are only able to write:
with config_context(plot_backend=None):
with config_context(plot_backend="plotly"):
print(get_config()["plot_backend"])
that will let the "plotly"
backend on. The problem is that one might not be the code owner of the internal config_context
and thus cannot really modify the inner call.
We used this pattern in scikit-learn for the transform_output
parameter or in skrub for the enable_subsampling
parameter and faced similar issue.
divakaivan
Metadata
Metadata
Assignees
Labels
needs-triageThis has been recently submitted and needs attentionThis has been recently submitted and needs attentionuser-reported