-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
keras_nlp RuntimeError: Exception encountered when calling MultiSegmentPacker.call(). #38
Comments
@dsbyprateekg, |
@tilakrayal I am getting a new error after changing the preset model. Please find below the link of my colab norebook- 11 frames ValueError: Expression (fold) != (__pd_eval_local_fold) has forbidden control characters.` https://colab.research.google.com/drive/1EF0nsa__mEgoq6D1uHeqnANTdSksa7dF?usp=sharing |
The colab link which was provided above redirects the another page where the code was not available to reproduce. Could you please re-check and provide the code. Thank you! |
@dsbyprateekg, |
Please go to TF Forum for help and support:
https://discuss.tensorflow.org/tag/keras
If you open a GitHub issue, here is our policy:
It must be a bug, a feature request, or a significant problem with the documentation (for small docs fixes please send a PR instead).
The form below must be filled out.
Here's why we have that policy:.
Keras developers respond to issues. We want to focus on work that benefits the whole community, e.g., fixing bugs and adding features. Support only helps individuals. GitHub also notifies thousands of people when issues are filed. We want them to see you communicating an interesting problem, rather than being redirected to Stack Overflow.
System information.
You can collect some of this information using our environment capture script:
https://github.com/tensorflow/tensorflow/tree/master/tools/tf_env_collect.sh
You can obtain the TensorFlow version with:
python -c "import tensorflow as tf; print(tf.version.GIT_VERSION, tf.version.VERSION)"
Describe the problem.
Describe the problem clearly here. Be sure to convey here why it's a bug in Keras or why the requested feature is needed.
preprocessor = keras_nlp.models.BertPreprocessor.from_preset(
preset="bert_large_en", # Name of the model
sequence_length=200, # Max sequence length, will be padded if shorter
)
outs = preprocessor(df.options.iloc[0])
Source code / logs.
RuntimeError Traceback (most recent call last)
in <cell line: 1>()
----> 1 outs = preprocessor(df.options.iloc[0]) # Process options for the first row
2
3 # Display the shape of each processed output
4 for k, v in outs.items():
5 print(k, ":", v.shape)
7 frames
/usr/local/lib/python3.10/dist-packages/tensorflow_text/python/ops/trimmer_ops.py in (.0)
345 )
346 return [
--> 347 ragged_tensor.RaggedTensor.from_row_splits(m, s)
348 for m, s in zip(o_values, o_splits)
349 ]
RuntimeError: Exception encountered when calling MultiSegmentPacker.call().
Arguments received by MultiSegmentPacker.call():
• inputs=[[['5979', '1104', '1103', '1378', '8477', '14702', '4856', '1103', '3772', '1104', '12556', '22293', '8102', '1811', '25082', '113', '150', '11414', '2137', '114', '1113', '1103', '4379', '107', '3764', '2927', '15136', '1596', '3367', '107', '6187', '1874', '10224', '3457', '1107', '15593', '13687', '136', '150', '11414', '2137', '1110', '170', '2749', '1115', '13822', '1103', '4379', '3764', '2927', '15136', '1596', '3367', '1107', '15593', '13687', '1118', '2112', '10164', '1103', '3796', '1104', '170', '1207', '1532', '1104', '2187', '1270', '107', '22520', '1843', '2187', '119', '107'], ['5979', '1104', '1103', '1378', '8477', '14702', '4856', '1103', '3772', '1104', '12556', '22293', '8102', '1811', '25082', '113', '150', '11414', '2137', '114', '1113', '1103', '4379', '107', '3764', '2927', '15136', '1596', '3367', '107', '6187', '1874', '10224', '3457', '1107', '15593', '13687', '136', '150', '11414', '2137', '1110', '170', '2749', '1115', '6986', '1103', '6187', '1874', '10224', '3457', '1206', '1103', '4379', '3764', '2927', '15136', '1596', '3367', '1107', '15593', '13687', '1105', '1103', '7140', '10537', '4267', '20623', '14971', '1121', '170', '5318', '1104', '1213', '1275', '1106', '170', '5318', '1104', '1164', '1406', '119'], ['5979', '1104', '1103', '1378', '8477', '14702', '4856', '1103', '3772', '1104', '12556', '22293', '8102', '1811', '25082', '113', '150', '11414', '2137', '114', '1113', '1103', '4379', '107', '3764', '2927', '15136', '15...
The text was updated successfully, but these errors were encountered: