-
Notifications
You must be signed in to change notification settings - Fork 456
Description
The pretrained_model_tests in CI nightly pipeline throws an error like below:
2023-12-25 12:22:11,568 - INFO - Load model from /tmp/pre-trained/ResNet50
/home/vsts/.conda/envs/tf2onnx/lib/python3.9/site-packages/tensorflow/python/keras/backend.py:427: UserWarning: tf.keras.backend.set_learning_phase
is deprecated and will be removed after 2020-10-11. To update it, simply pass a True/False value to the training
argument of the __call__
method of your layer or model.
warnings.warn('tf.keras.backend.set_learning_phase
is deprecated and '
2023-12-25 12:22:17,328 - ERROR - Failed to run keras_resnet50
Traceback (most recent call last):
File "/home/vsts/work/1/s/tests/run_pretrained_models.py", line 799, in main
ret = t.run_test(test, backend=args.backend, onnx_file=args.onnx_file,
File "/home/vsts/work/1/s/tests/run_pretrained_models.py", line 413, in run_test
graph_def, input_names, outputs = tf_loader.from_keras(model_path, input_names, outputs)
File "/home/vsts/.conda/envs/tf2onnx/lib/python3.9/site-packages/tf2onnx-1.15.1-py3.9.egg/tf2onnx/tf_loader.py", line 649, in from_keras
keras_model = _keras.models.load_model(model_path, custom_objects)
File "/home/vsts/.conda/envs/tf2onnx/lib/python3.9/site-packages/tensorflow/python/keras/saving/save.py", line 202, in load_model
return saved_model_load.load(filepath, compile, options)
File "/home/vsts/.conda/envs/tf2onnx/lib/python3.9/site-packages/tensorflow/python/keras/saving/saved_model/load.py", line 153, in load
loaded = tf_load.load_partial(path, nodes_to_load, options=options)
File "/home/vsts/.conda/envs/tf2onnx/lib/python3.9/site-packages/tensorflow/python/saved_model/load.py", line 1043, in load_partial
loader = Loader(object_graph_proto, saved_model_proto, export_dir,
File "/home/vsts/.conda/envs/tf2onnx/lib/python3.9/site-packages/tensorflow/python/saved_model/load.py", line 226, in init
self._restore_checkpoint()
File "/home/vsts/.conda/envs/tf2onnx/lib/python3.9/site-packages/tensorflow/python/saved_model/load.py", line 561, in _restore_checkpoint
load_status = saver.restore(variables_path, self._checkpoint_options)
File "/home/vsts/.conda/envs/tf2onnx/lib/python3.9/site-packages/tensorflow/python/checkpoint/checkpoint.py", line 1478, in restore
restore_lib.CheckpointPosition(
File "/home/vsts/.conda/envs/tf2onnx/lib/python3.9/site-packages/tensorflow/python/checkpoint/restore.py", line 62, in restore
restore_ops = self._restore_descendants(reader)
File "/home/vsts/.conda/envs/tf2onnx/lib/python3.9/site-packages/tensorflow/python/checkpoint/restore.py", line 459, in _restore_descendants
_queue_children_for_restoration(current_position, visit_queue)
File "/home/vsts/.conda/envs/tf2onnx/lib/python3.9/site-packages/tensorflow/python/checkpoint/restore.py", line 606, in _queue_children_for_restoration
local_object = trackable._lookup_dependency(child.local_name,
TypeError: _lookup_dependency() takes 2 positional arguments but 3 were given
This is caused by tensorflow-text version issue.