File tree Expand file tree Collapse file tree 1 file changed +5
-10
lines changed
Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -502,16 +502,6 @@ def wrap_into_list(x):
502502 # wrap outputs info in a dictionary if they are not already in one
503503 for i in range (n_outs ):
504504 if outs_info [i ] is not None :
505- if isinstance (outs_info [i ], dict ):
506- if outs_info [i ].get ("return_steps" , None ) is not None :
507- raise DeprecationWarning (
508- "Using `return_steps` has been deprecated. "
509- "Simply select the entries you need using a "
510- "subtensor. Scan will optimize memory "
511- "consumption, so do not worry about that."
512- )
513- # END
514-
515505 if not isinstance (outs_info [i ], dict ):
516506 # by default any output has a tap value of -1
517507 outs_info [i ] = dict ([("initial" , outs_info [i ]), ("taps" , [- 1 ])])
@@ -551,6 +541,11 @@ def wrap_into_list(x):
551541 ("All the tap values must be smaller than 0." ),
552542 outs_info [i ],
553543 )
544+ _unexpected_keys = set (outs_info [i ]) - {"initial" , "taps" , "inplace" }
545+ if _unexpected_keys :
546+ raise ValueError (
547+ f"These keys were unexpected in Scan outputs_info[{ i } ]: { _unexpected_keys } "
548+ )
554549 else :
555550 # if a None is provided as the output info we replace it
556551 # with an empty OrdereDict() to simplify handling
You can’t perform that action at this time.
0 commit comments