Skip to content

Commit 32ddbcf

Browse files
committed
Deprecate rarely used Function functionality
1 parent cd3e048 commit 32ddbcf

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
@@ -388,6 +388,9 @@ def __init__(
388388
self.nodes_with_inner_function = []
389389
self.output_keys = output_keys
390390

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

393396
# Group indexes of inputs that are potentially aliased to each other
@@ -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:
@@ -1563,6 +1568,8 @@ def __init__(
15631568
)
15641569
for i in self.inputs
15651570
]
1571+
if any(self.refeed):
1572+
warnings.warn("Inputs with default values are deprecated.", FutureWarning)
15661573

15671574
def create(self, input_storage=None, storage_map=None):
15681575
"""

0 commit comments

Comments
 (0)