Skip to content

Commit 1da9599

Browse files
committed
Deleted output_subset kwargs
1 parent d455460 commit 1da9599

File tree

1 file changed

+7
-30
lines changed

1 file changed

+7
-30
lines changed

pytensor/compile/function/types.py

Lines changed: 7 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -792,18 +792,14 @@ def __call__(self, *args, **kwargs):
792792
The function inputs can be passed as keyword argument. For this, use
793793
the name of the input or the input instance as the key.
794794
795-
Keyword argument ``output_subset`` is a list of either indices of the
796-
function's outputs or the keys belonging to the `output_keys` dict
797-
and represent outputs that are requested to be calculated. Regardless
798-
of the presence of ``output_subset``, the updates are always calculated
799-
and processed. To disable the updates, you should use the ``copy``
795+
The updates are always calculated and processed.
796+
To disable the updates, you should use the ``copy``
800797
method with ``delete_updates=True``.
801798
802799
Returns
803800
-------
804801
list
805-
List of outputs on indices/keys from ``output_subset`` or all of them,
806-
if ``output_subset`` is not passed.
802+
List of outputs.
807803
"""
808804

809805
def restore_defaults():
@@ -816,10 +812,6 @@ def restore_defaults():
816812
profile = self.profile
817813
t0 = time.perf_counter()
818814

819-
output_subset = kwargs.pop("output_subset", None)
820-
if output_subset is not None and self.output_keys is not None:
821-
output_subset = [self.output_keys.index(key) for key in output_subset]
822-
823815
# Reinitialize each container's 'provided' counter
824816
if self.trust_input:
825817
i = 0
@@ -955,11 +947,7 @@ def restore_defaults():
955947
# Do the actual work
956948
t0_fn = time.perf_counter()
957949
try:
958-
outputs = (
959-
self.vm()
960-
if output_subset is None
961-
else self.vm(output_subset=output_subset)
962-
)
950+
outputs = self.vm()
963951
except Exception:
964952
restore_defaults()
965953
if hasattr(self.vm, "position_of_error"):
@@ -1040,24 +1028,13 @@ def restore_defaults():
10401028
profile.ignore_first_call = False
10411029
if self.return_none:
10421030
return None
1043-
elif self.unpack_single and len(outputs) == 1 and output_subset is None:
1031+
elif self.unpack_single and len(outputs) == 1:
10441032
return outputs[0]
10451033
else:
10461034
if self.output_keys is not None:
10471035
assert len(self.output_keys) == len(outputs)
1048-
1049-
if output_subset is None:
1050-
return dict(zip(self.output_keys, outputs))
1051-
else:
1052-
return {
1053-
self.output_keys[index]: outputs[index]
1054-
for index in output_subset
1055-
}
1056-
1057-
if output_subset is None:
1058-
return outputs
1059-
else:
1060-
return [outputs[i] for i in output_subset]
1036+
return dict(zip(self.output_keys, outputs))
1037+
return outputs
10611038

10621039
value = property(
10631040
lambda self: self._value,

0 commit comments

Comments
 (0)