Python package version dependencies on ONNX nodes

Hi.

I have a problem when using the “ONNX to TensorFlow Network Converter” node.

My test environment is as follows

  • KNIME AP 4.5.6
  • Python 3.9.13

I have installed some packages using pip.
The list is as follows onnx, onnx_tf, tensorflow_probability, tensorflow, keras, keras_cv, keras_nlp.

However, it still didn’t work and the error is shown below:
Some import statements contained in this node seem to be out of date.

So, I would be grateful if you could let me know which package versions were used when developing that node and which ones I should install to get the correct version.

INFO ONNX to TensorFlow Network Converter 3:2 WARNING:tensorflow:Please fix your imports. Module tensorflow.python.training.tracking.autotrackable has been moved to tensorflow.python.trackable.autotrackable. The old module will be deleted in version 2.11.
INFO ONNX to TensorFlow Network Converter 3:2 WARNING:tensorflow:Please fix your imports. Module tensorflow.python.training.tracking.base has been moved to tensorflow.python.trackable.base. The old module will be deleted in version 2.11.
INFO ONNX to TensorFlow Network Converter 3:2 WARNING:tensorflow:Please fix your imports. Module tensorflow.python.training.tracking.base_delegate has been moved to tensorflow.python.trackable.base_delegate. The old module will be deleted in version 2.11.
INFO ONNX to TensorFlow Network Converter 3:2 WARNING:tensorflow:Please fix your imports. Module tensorflow.python.training.tracking.data_structures has been moved to tensorflow.python.trackable.data_structures. The old module will be deleted in version 2.11.
INFO ONNX to TensorFlow Network Converter 3:2 WARNING:tensorflow:Please fix your imports. Module tensorflow.python.training.tracking.graph_view has been moved to tensorflow.python.checkpoint.graph_view. The old module will be deleted in version 2.11.
INFO ONNX to TensorFlow Network Converter 3:2 WARNING:tensorflow:Please fix your imports. Module tensorflow.python.training.tracking.util has been moved to tensorflow.python.checkpoint.checkpoint. The old module will be deleted in version 2.11.
INFO ONNX to TensorFlow Network Converter 3:2 WARNING:tensorflow:Please fix your imports. Module tensorflow.python.training.checkpoint_management has been moved to tensorflow.python.checkpoint.checkpoint_management. The old module will be deleted in version 2.9.
DEBUG ONNX to TensorFlow Network Converter 3:2 reset
ERROR ONNX to TensorFlow Network Converter 3:2 Execute failed: cannot import name ‘disable_mlir_graph_optimization’ from ‘tensorflow.python.framework.config’ (C:\Users\khhfh\anaconda3\envs\py3_knime\lib\site-packages\tensorflow\python\framework\config.py)

Hi @hhkim -

I spent some time trying to get this to work myself, without success - mainly I got caught in a loop of ever-changing Python package dependencies, without finding the right combination of packages that works.

It’s possible that there’s an issue with the node, I just wasn’t able to tell. Let me ask internally from people who really know this stuff.

@hhkim setting up knime and deep learning can be a challenge. Maybe you try and follow the configurations and debug methods described here.

It might be that the Python version is then 3.6 or 3.7 instead of 3.9:

1 Like

Thank you @mlauber71!

@hhkim, also note that the “ONNX to TensorFlow Network Converter” sadly was not yet updated to work with TensorFlow 2. Therefore, very specific versions of “onnx” and “onnx-tf” are required (see KNIME Deep Learning Integration Installation Guide).

2 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.