File tree Expand file tree Collapse file tree
tests/unit/autojac/_transform Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -31,28 +31,6 @@ def check_keys(self) -> tuple[set[Tensor], set[Tensor]]:
3131 return self ._required_keys , self ._output_keys
3232
3333
34- def test_call_checks_keys ():
35- """
36- Tests that a ``Transform`` checks that the provided dictionary to the `__call__` function
37- contains keys that correspond exactly to `required_keys`.
38- """
39-
40- a1 = torch .randn ([2 ])
41- a2 = torch .randn ([3 ])
42- t = FakeTransform (required_keys = {a1 }, output_keys = {a1 , a2 })
43-
44- t (TensorDict ({a1 : a2 }))
45-
46- with raises (ValueError ):
47- t (TensorDict ({a2 : a1 }))
48-
49- with raises (ValueError ):
50- t (TensorDict ({}))
51-
52- with raises (ValueError ):
53- t (TensorDict ({a1 : a2 , a2 : a1 }))
54-
55-
5634def test_compose_checks_keys ():
5735 """
5836 Tests that the composition of ``Transform``s checks that the inner transform's `output_keys`
You can’t perform that action at this time.
0 commit comments