pytorch/test
Richard Zou cedca377bd Re-enable TestNamedTensor.test_big_tensor_repr (#29407)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/29407

Fixes https://github.com/pytorch/pytorch/issues/27753.

The bug was that random tensors print subtly differently. This causes
the "names=" tag to appear in slightly different places; sometimes it is
on the same line as the data, sometimes it is on different lines.

For this test, we wanted to know the following:
- printing a big named tensor's repr doesn't crash
- a big named tensor's repr shows the names

This PR changes the test to check those two things.

Test Plan: - run existing tests

Differential Revision: D18428657

Pulled By: zou3519

fbshipit-source-id: 6bcf247ffba010520878a175e766a496028f87d9
2019-11-11 13:32:32 -08:00
..
backward_compatibility Fix BC CI (#29533) 2019-11-10 16:04:01 -08:00
bottleneck
cpp F::embedding, F::embedding_bag, moved Embedding and EmbeddingBag options to embedding.h in options 2019-11-11 11:51:26 -08:00
cpp_api_parity C++ parity, nn::CrossMapLRN2d (#29039) 2019-11-05 15:27:08 -08:00
cpp_extensions Delete ATenDispatch (#28468) 2019-10-24 22:15:00 -07:00
custom_operator Implement more of of the nn.Module API (#28828) 2019-11-06 22:58:25 -08:00
data Makes test_cuda.py's generated tensor op tests generic (#27210) 2019-10-04 02:40:59 -07:00
error_messages
expect Revert "Revert D18171156: Merge Tensor and Variable." (#29299) 2019-11-08 09:11:20 -08:00
jit add hasattr() (#29332) 2019-11-08 13:58:14 -08:00
onnx fixed random gerenation export (#29354) 2019-11-08 11:43:30 -08:00
optim
scripts Add scripts to run cuda-memcheck (#28127) 2019-10-29 12:05:29 -07:00
test_module
common_cuda.py
common_device_type.py Adds @overridePrecision decorator (#28131) 2019-10-16 19:47:55 -07:00
common_distributed.py Enable mgpu unit tests for rocm 2019-10-11 14:35:36 -07:00
common_methods_invocations.py Fix nuclear norm with requires_grad=True (#26303) 2019-09-26 12:08:25 -07:00
common_nn.py Fix poisson_nll_loss with full option (#28637) 2019-11-05 07:10:35 -08:00
common_quantization.py Add e2e test for conv+bn (#27348) 2019-11-01 11:28:47 -07:00
common_quantized.py Unify quantized conv and linear tests (#26992) 2019-10-01 14:07:16 -07:00
common_utils.py Generalized LU factorization (#28608) 2019-11-05 12:27:40 -08:00
dist_autograd_test.py Revert RRef.to_here()/local_value() return type (#29396) 2019-11-08 08:31:18 -08:00
dist_optimizer_test.py Simple distributed optimizer (#29304) 2019-11-11 12:02:24 -08:00
dist_utils.py Properly shutdown RPC even in the case of clean_shutdown=False. (#29148) 2019-11-11 11:30:48 -08:00
expecttest.py
HowToWriteTestsUsingFileCheck.md
hypothesis_utils.py Refactor qconv_prepack and qconv_unpack to support conv3d (#28481) 2019-10-27 14:43:16 -07:00
jit_utils.py split remaining "easy" tests (#29249) 2019-11-06 13:23:01 -08:00
rpc_test.py Enable test_stress_light_rpc in rpc_test.py 2019-11-11 12:22:10 -08:00
run_test.py Remove test_quantizer.py and reuse one of its test in test_quantization.py (#27269) 2019-10-29 19:04:21 -07:00
simulate_nccl_errors.py Detect and handle NCCL errors appropriately in ProcessGroupNCCL. (#25012) 2019-08-22 16:12:41 -07:00
test_autograd.py Remove autograd copy_ specific isFloatingPoint (#28279) 2019-10-29 12:25:39 -07:00
test_c10d_spawn.py Build torch.distributed with Gloo backend on macOS (#25260) 2019-09-05 07:09:50 -07:00
test_c10d.py Moving python allgather_coalesced impl from Py to C. (#29059) 2019-11-04 08:34:34 -08:00
test_cpp_api_parity.py Wrapping namespace Reduction in namespace at (#26606) (#27422) 2019-10-15 11:05:40 -07:00
test_cpp_extensions.py add pybind version of HANDLE_TH_ERRORS 2019-11-07 08:35:11 -08:00
test_cuda_primary_ctx.py
test_cuda.py Use handle pool to manage cuparse handles (#29426) 2019-11-09 23:12:34 -08:00
test_data_parallel.py Split out data_parallel tests from test_nn.py into a separate (#28297) 2019-10-18 17:48:40 -07:00
test_dataloader.py Removes @default_floating_dtype decorator (#27628) 2019-10-12 12:39:34 -07:00
test_dist_autograd_fork.py Enable EXE001 flake8 check. (#27560) 2019-10-09 09:15:29 -07:00
test_dist_autograd_spawn.py Enable EXE001 flake8 check. (#27560) 2019-10-09 09:15:29 -07:00
test_dist_optimizer_fork.py Simple distributed optimizer (#29304) 2019-11-11 12:02:24 -08:00
test_dist_optimizer_spawn.py Simple distributed optimizer (#29304) 2019-11-11 12:02:24 -08:00
test_distributed.py Moving python allgather_coalesced impl from Py to C. (#29059) 2019-11-04 08:34:34 -08:00
test_distributions.py Revert D18249048: Moved VonMises distribution with sampling upstream from Pyro. 2019-11-04 09:50:50 -08:00
test_docs_coverage.py Fix test_docs_coverage. 2019-10-15 12:20:13 -07:00
test_expecttest.py
test_fake_quant.py Add the unittest import for test_fake_quant.py (#28815) 2019-10-28 17:52:57 -07:00
test_function_schema.py Add isBackwardCompatibleWith for Argument and FunctionSchema (#23409) 2019-09-13 20:37:14 -07:00
test_indexing.py Buffer python warning to avoid deadlocks 2019-11-07 08:35:06 -08:00
test_jit_disabled.py
test_jit_fuser.py Switching tests to ProfilingExecutor (rebased) 2019-10-29 11:41:42 -07:00
test_jit_py3.py submodule swapping via module interface (#28409) 2019-11-05 11:31:40 -08:00
test_jit_string.py
test_jit.py move type inference for arange into c++ (#27629) 2019-11-11 11:26:21 -08:00
test_logging.py
test_mkldnn.py
test_multiprocessing_spawn.py
test_multiprocessing.py Disable tsan for test_multiprocessing. (#27410) 2019-10-07 11:29:04 -07:00
test_namedtensor.py Re-enable TestNamedTensor.test_big_tensor_repr (#29407) 2019-11-11 13:32:32 -08:00
test_namedtuple_return_api.py Migrate return type void to () for native functions. (#28290) 2019-10-22 15:23:20 -07:00
test_nccl.py
test_nn.py Revert D18286473: Use NNPACK for strided convolutions. 2019-11-10 08:11:11 -08:00
test_numba_integration.py Fixed test_numba_integration (#25017) 2019-08-23 08:58:08 -07:00
test_optim.py Add multiplicative lr. (#27254) 2019-10-23 11:38:45 -07:00
test_qat.py Refactoing names for consistency 2019-10-16 12:18:26 -07:00
test_quantization.py Make HistogramObserver scriptable with @torch.jit.ignore (#27950) 2019-11-07 18:02:44 -08:00
test_quantized_models.py Refactoing names for consistency 2019-10-16 12:18:26 -07:00
test_quantized_nn_mods.py Fix reprs for _intrinsic modules 2019-10-02 19:55:49 -07:00
test_quantized_tensor.py Quantized Tensor support copy (#28612) 2019-11-01 17:40:17 -07:00
test_quantized.py Adding inplace quantized relu6 2019-11-09 14:53:42 -08:00
test_rpc_fork.py Enable EXE001 flake8 check. (#27560) 2019-10-09 09:15:29 -07:00
test_rpc_spawn.py Enable EXE001 flake8 check. (#27560) 2019-10-09 09:15:29 -07:00
test_sparse.py Removes @default_floating_dtype decorator (#27628) 2019-10-12 12:39:34 -07:00
test_tensorboard.py fix flaky test (#26395) 2019-09-19 11:13:31 -07:00
test_throughput_benchmark.py
test_torch.py move type inference for arange into c++ (#27629) 2019-11-11 11:26:21 -08:00
test_type_hints.py Documentation for named tensors (#27173) 2019-10-08 22:22:30 -07:00
test_type_info.py
test_type_promotion.py Add some non-contiguous tests 2019-11-07 07:10:22 -08:00
test_utils.py Opset 11 updates (#28225) 2019-11-04 12:16:12 -08:00