(
n_tensors: int,
sizes: List[List[int]],
n_int: int,
dtype: torch.dtype,
n_sets_per_plan_test: int,
n_method_test_suites: int,
)
| 69 | |
| 70 | |
| 71 | def get_rand_input_values( |
| 72 | n_tensors: int, |
| 73 | sizes: List[List[int]], |
| 74 | n_int: int, |
| 75 | dtype: torch.dtype, |
| 76 | n_sets_per_plan_test: int, |
| 77 | n_method_test_suites: int, |
| 78 | ) -> List[List[MethodInputType]]: |
| 79 | # pyre-ignore[7]: expected `List[List[List[Union[bool, float, int, Tensor]]]]` but got `List[List[List[Union[int, Tensor]]]]` |
| 80 | return [ |
| 81 | [ |
| 82 | [(torch.rand(*sizes[i]) - 0.5).to(dtype) for i in range(n_tensors)] |
| 83 | + [DEFAULT_INT_INPUT for _ in range(n_int)] |
| 84 | for _ in range(n_sets_per_plan_test) |
| 85 | ] |
| 86 | for _ in range(n_method_test_suites) |
| 87 | ] |
| 88 | |
| 89 | |
| 90 | def get_rand_output_values( |
no test coverage detected