BERT Sentiment Analysis Workflow

Hey All,

I am trying out the BERT Sentiment Analysis workflow from the KNIME hub and am running into a strange issue.

When I open the DL Python Network Creator node and execute it’s successful and shows as below:

Here is code:

variable name of the output network: output_network

import tensorflow as tf
import tensorflow_hub as hub

input_word_ids = tf.keras.layers.Input(shape=(MAX_SEQ_LEN,), dtype=tf.int32,
input_mask = tf.keras.layers.Input(shape=(MAX_SEQ_LEN,), dtype=tf.int32,
segment_ids = tf.keras.layers.Input(shape=(MAX_SEQ_LEN,), dtype=tf.int32,
pooled_output, sequence_output = bert_layer([input_word_ids, input_mask, segment_ids])

x = tf.keras.layers.GlobalAveragePooling1D()(sequence_output)
x = tf.keras.layers.Dropout(0.2)(x)
x = tf.keras.layers.Dense(128, activation=‘relu’)(x)
output = tf.keras.layers.Dense(1, activation=‘sigmoid’)(x)

model = tf.keras.models.Model(
inputs=[input_word_ids, input_mask, segment_ids], outputs=output)
output_network = model

When I close the configuration and execute the node it error out with the following:

ERROR DL Python Network Creator 0:125 Execute failed: ‘DataFrame’ object has no attribute ‘convert_objects’
Traceback (most recent call last):
File “”, line 5, in
File “C:\Program Files\KNIME\plugins\org.knime.dl.python_4.3.1.v202101261633\py\”, line 97, in get_layer_data_specs_as_data_frames
input_specs = extractor.input_specs_to_data_frame()
File “C:\Program Files\KNIME\plugins\org.knime.dl.python_4.3.1.v202101261633\py\”, line 57, in input_specs_to_data_frame
return self.__layer_data_specs_to_data_frame(self._network_spec.input_specs)
File “C:\Program Files\KNIME\plugins\org.knime.dl.python_4.3.1.v202101261633\py\”, line 88, in __layer_data_specs_to_data_frame
specs_with_numeric_types = specs.convert_objects(convert_numeric=True)
File “C:\Anaconda\envs\tf\lib\site-packages\pandas\core\”, line 5478, in getattr
return object.getattribute(self, name)
AttributeError: ‘DataFrame’ object has no attribute ‘convert_objects’

I don’t see what the issue might be and appreciate any advice!

Note As a quick note I ran this workflow on MacOS and it does not work there either. When open the DL Python Network Creator node Executes Successfully but when I close the config window and execute it fails.