Skip to content

Commit 084469a

Browse files
authored
[test] Call eval (Samsung#188)
This commit calls .eval() to turn off warning mesage. TICO-DCO-1.0-Signed-off-by: seongwoo <mhs4670go@naver.com>
1 parent 21f0061 commit 084469a

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

test/unit_test/utils_test/test_convert.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,20 @@
2626
class ConvertTest(unittest.TestCase):
2727
def test_args(self):
2828
m = SimpleAdd()
29-
tico.convert(m, m.get_example_inputs())
29+
tico.convert(m.eval(), m.get_example_inputs())
3030

3131
def test_kwargs(self):
3232
m = SimpleAdd()
3333
inputs = m.get_example_inputs()
3434
kwargs = {"x": inputs[0], "y": inputs[1]}
35-
tico.convert(m, tuple(), kwargs)
35+
tico.convert(m.eval(), tuple(), kwargs)
3636

3737
def test_args_kwargs(self):
3838
m = SimpleAdd()
3939
inputs = m.get_example_inputs()
4040
args = (inputs[0],)
4141
kwargs = {"y": inputs[1]}
42-
tico.convert(m, args, kwargs)
42+
tico.convert(m.eval(), args, kwargs)
4343

4444

4545
class ConvertFromExportedProgramTest(unittest.TestCase):

test/unit_test/utils_test/test_infer.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def setUp(self):
2828
# Input: torch.ones(1), torch.ones(1)
2929
m = SimpleAdd()
3030
self.torch_model = m
31-
self.circle_model = tico.convert(m, m.get_example_inputs())
31+
self.circle_model = tico.convert(m.eval(), m.get_example_inputs())
3232

3333
def test_add_float(self):
3434
x = torch.randn(1)
@@ -61,7 +61,7 @@ def test_concat(self):
6161
# convert
6262
m = SimpleCatDefault()
6363
torch_model = m
64-
circle_model = tico.convert(m, m.get_example_inputs())
64+
circle_model = tico.convert(m.eval(), m.get_example_inputs())
6565
# test
6666
x = torch.randn(3)
6767
y = torch.randn(2)
@@ -75,7 +75,7 @@ def test_concat_with_dim(self):
7575
# convert
7676
m = SimpleCatWithDim()
7777
torch_model = m
78-
circle_model = tico.convert(m, m.get_example_inputs())
78+
circle_model = tico.convert(m.eval(), m.get_example_inputs())
7979
# test
8080
x = torch.randn(3, 3)
8181
y = torch.randn(3, 3)

0 commit comments

Comments
 (0)