Skip to content

Commit 4258475

Browse files
committed
Deprecate rarely used Function functionality
1 parent d77f26c commit 4258475

File tree

2 files changed

+190
-123
lines changed

2 files changed

+190
-123
lines changed

Diff for: pytensor/compile/function/types.py

+9-2
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,9 @@ def __init__(
387387
self.nodes_with_inner_function = []
388388
self.output_keys = output_keys
389389

390+
if self.output_keys is not None:
391+
warnings.warn("output_keys is deprecated.", FutureWarning)
392+
390393
assert len(self.input_storage) == len(self.maker.fgraph.inputs)
391394
assert len(self.output_storage) == len(self.maker.fgraph.outputs)
392395

@@ -836,8 +839,10 @@ def __call__(self, *args, **kwargs):
836839
t0 = time.perf_counter()
837840

838841
output_subset = kwargs.pop("output_subset", None)
839-
if output_subset is not None and self.output_keys is not None:
840-
output_subset = [self.output_keys.index(key) for key in output_subset]
842+
if output_subset is not None:
843+
warnings.warn("output_subset is deprecated.", FutureWarning)
844+
if self.output_keys is not None:
845+
output_subset = [self.output_keys.index(key) for key in output_subset]
841846

842847
# Reinitialize each container's 'provided' counter
843848
if self.trust_input:
@@ -1560,6 +1565,8 @@ def __init__(
15601565
)
15611566
for i in self.inputs
15621567
]
1568+
if any(self.refeed):
1569+
warnings.warn("Inputs with default values are deprecated.", FutureWarning)
15631570

15641571
def create(self, input_storage=None, storage_map=None):
15651572
"""

0 commit comments

Comments
 (0)