Closed Blaok closed 4 years ago
@Hecmay Do you know why the changes cause errors in hlib/tests/test_keras.py
?
@Hecmay Seems like there still exist some cases that could lead to random behavior. Can you take a look later at the failed cases? Maybe we should replace some list
with ordered_list
or ordered_set
.
Hmmm. But the errors are the same when I rerun the tests.
I guess there are some updates with Keras and that makes our parser not working anymore.
I need to check it. We can use specify a specific Keras version for installation to avoid such issues.
The error can be fixed by setting up the specific versions when installing Keras and TF: https://github.com/Hecmay/heterocl/blob/fix/hlib/python/setup.py#L45
@Blaok @chhzh123 @seanlatias
Is it possible to write a test case that leads to incorrect behavior, which will be caught in HeteroCL? In Python, we can use
try
andexcept
to test incorrect behavior.
It's impossible with exit(EXIT_FAILURE)
because it will terminate the whole process immediately. Are there any existing API that can raise a Python exception from TVM? If so, we can leverage that. Otherwise, we'll have to look for some general approach to raise an exception from C++.
I believe you can use this Check()
.
@Hecmay There was an assert_almost_equal
error reported from test_keras.py
. The threshold might be too tight; the second run of the tests succeeded.
Fix #248.