Skip to content

Commit fd93ca8

Browse files
authored
Fix tfjs CI failure and add tfjs convert log (#1797)
* fix tfjs ci failure and change log debug to warning Signed-off-by: hwangdeyu <[email protected]>
1 parent 72d6460 commit fd93ca8

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

tests/backend_test_base.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,15 +203,18 @@ def convert_to_tfjs(self, graph_def_path, output_names):
203203
try:
204204
from tensorflowjs.converters import converter
205205
except ImportError:
206+
self.logger.warning("Tensorflowjs.converters package imports failed.")
206207
return None
207208
tfjs_path = os.path.join(self.test_data_directory, self._testMethodName + "_tfjs")
208209
try:
209210
converter.convert([graph_def_path, tfjs_path, '--input_format', 'tf_frozen_model',
210211
'--output_node_names', ','.join(output_names)])
211212
except ValueError:
213+
self.logger.warning("Convert tensorflowjs graph failed.")
212214
return None
213215
model_path = os.path.join(tfjs_path, 'model.json')
214216
if not os.path.exists(model_path):
217+
self.logger.warning("Tensorflowjs model path %s is empty.", model_path)
215218
return None
216219
return model_path
217220

tests/test_cond.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ def func(x, y):
159159
output_names_with_port = ["output:0"]
160160
self.run_test_case(func, feed_dict, input_names_with_port, output_names_with_port)
161161

162+
@skip_tfjs("TFJS issue, cannot read properties of undefined (reading 'name')")
162163
def test_case_with_exclusive(self):
163164
x_val = np.array([1, 2, 3], dtype=np.float32)
164165
y_val = np.array([4, 5, 6], dtype=np.float32)
@@ -174,6 +175,7 @@ def func(x, y):
174175
output_names_with_port = ["output:0"]
175176
self.run_test_case(func, feed_dict, input_names_with_port, output_names_with_port)
176177

178+
@skip_tfjs("TFJS issue, cannot read properties of undefined (reading 'name')")
177179
def test_case_without_default_branch(self):
178180
def func(x, y):
179181
x = tf.add(x, 1, name="add_x")

0 commit comments

Comments
 (0)