Skip to content

JIT test suite has dependencies across tests #39463

@ezyang

Description

@ezyang

Steps to reproduce:

  1. Induce a bug by adding more type annotations. https://github.com/ezyang/pytorch/tree/poc/jit-bug is what I was working on when this happened
  2. Run these tests:
(/home/ezyang/local/pytorch-tmp-env) [ezyang@devvm066.ash0 ~/local/pytorch-tmp] python test/test_jit.py TestScript.test_circular_depend
ency
Couldn't download test skip set, leaving all tests enabled...
.
----------------------------------------------------------------------
Ran 1 test in 0.211s

OK
(/home/ezyang/local/pytorch-tmp-env) [ezyang@devvm066.ash0 ~/local/pytorch-tmp] python test/test_jit.py TestScript.test_attribute_in_init TestScript.test_circular_dependency
Couldn't download test skip set, leaving all tests enabled...
.F
======================================================================
FAIL: test_circular_dependency (__main__.TestScript)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_jit.py", line 5303, in test_circular_dependency
    self.getExportImportCopy(C())
  File "/data/users/ezyang/pytorch-tmp/torch/jit/__init__.py", line 1581, in init_then_script
    original_init(self, *args, **kwargs)
  File "test/test_jit.py", line 5296, in __init__
    self.foo = torch.nn.Sequential(B())
  File "/data/users/ezyang/pytorch-tmp/torch/jit/__init__.py", line 1587, in init_then_script
    self.__dict__["_actual_script_module"] = torch.jit._recursive.create_script_module(self, make_stubs)
  File "/data/users/ezyang/pytorch-tmp/torch/jit/_recursive.py", line 305, in create_script_module
    concrete_type = concrete_type_store.get_or_create_concrete_type(nn_module)
  File "/data/users/ezyang/pytorch-tmp/torch/jit/_recursive.py", line 264, in get_or_create_concrete_type
    concrete_type_builder = infer_concrete_type_builder(nn_module)
  File "/data/users/ezyang/pytorch-tmp/torch/jit/_recursive.py", line 128, in infer_concrete_type_builder
    assert attr_type.is_interface_type()
AssertionError

----------------------------------------------------------------------
Ran 2 tests in 0.152s

FAILED (failures=1)
(/home/ezyang/local/pytorch-tmp-env) [ezyang@devvm066.ash0 ~/local/pytorch-tmp] python test/test_jit.py TestScript.test_attribute_in_init
Couldn't download test skip set, leaving all tests enabled...
.
----------------------------------------------------------------------
Ran 1 test in 0.047s

OK

Individually the tests pass but together they fail.

cc @suo

Metadata

Metadata

Assignees

No one assigned

    Labels

    oncall: jitAdd this issue/PR to JIT oncall triage queuetriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate module

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions