Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
name: Original_Title
type: text
level: word
encoder: t5
reduce_output: null
name: Keyword
type: text
level: word
tied_weights: Original_Title
encoder: t5
reduce_output: null
name: Optimized_Title
type: sequence
level: word
decoder: generator

This comment has been minimized.

Copy link

@marcusbianco marcusbianco commented Dec 15, 2020

Thanks a LOT Hamlet!


This comment has been minimized.

Copy link

@mithila2806 mithila2806 commented Dec 20, 2020


Thank you for the Title automation article on SEJ -

I'm very much curious to run this code. Tried many ways but stuck on one step (training the model).

Train Model

I'm getting some errors in Epoch 1. Screenshots attached.

Error - part 1

Error - part 2

Error - part 3

I have also linked the Error log file for more details.

Any help on how to resolve these errors would be very much appreciated. Merry Christmas and Happy New Year :)

Thanks in advance,


This comment has been minimized.


This comment has been minimized.

Copy link

@mithila2806 mithila2806 commented Dec 21, 2020

Hi @hamletbatista

Thank you very much for the prompt reply.

I did make changes in the code as per the thread you shared above and included the updated YAML file.

My Collab Notebook (If needed)



Afraid to say I'm still stuck on the same step with below error:

`Epoch 1
Training: 0% 0/6 [00:00<?, ?it/s]Traceback (most recent call last):
File "/usr/local/bin/ludwig", line 8, in
File "/usr/local/lib/python3.6/dist-packages/ludwig/", line 146, in main
File "/usr/local/lib/python3.6/dist-packages/ludwig/", line 72, in init
getattr(self, args.command)()
File "/usr/local/lib/python3.6/dist-packages/ludwig/", line 77, in train
File "/usr/local/lib/python3.6/dist-packages/ludwig/", line 412, in cli
File "/usr/local/lib/python3.6/dist-packages/ludwig/", line 197, in train_cli
File "/usr/local/lib/python3.6/dist-packages/ludwig/", line 469, in train
File "/usr/local/lib/python3.6/dist-packages/ludwig/models/", line 552, in train
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/eager/", line 780, in call
result = self._call(*args, **kwds)
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/eager/", line 823, in _call
self._initialize(args, kwds, add_initializers_to=initializers)
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/eager/", line 697, in _initialize
*args, **kwds))
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/eager/", line 2855, in _get_concrete_function_internal_garbage_collected
graph_function, _, _ = self._maybe_define_function(args, kwargs)
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/eager/", line 3213, in _maybe_define_function
graph_function = self._create_graph_function(args, kwargs)
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/eager/", line 3075, in _create_graph_function
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/", line 986, in func_graph_from_py_func
func_outputs = python_func(*func_args, **func_kwargs)
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/eager/", line 600, in wrapped_fn
return weak_wrapped_fn().wrapped(*args, **kwds)
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/eager/", line 3735, in bound_method_wrapper
return wrapped_fn(*args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/", line 973, in wrapper
raise e.ag_error_metadata.to_exception(e)
ValueError: in user code:

/usr/local/lib/python3.6/dist-packages/ludwig/models/ train_step  *
    model_outputs = self((inputs, targets), training=True)
/usr/local/lib/python3.6/dist-packages/ludwig/models/ call  *
    encoder_output = encoder(input_values, training=training,
/usr/local/lib/python3.6/dist-packages/ludwig/features/ call  *
    encoder_output = self.encoder_obj(
/usr/local/lib/python3.6/dist-packages/ludwig/encoders/ call  *
    transformer_outputs = self.transformer(
/usr/local/lib/python3.6/dist-packages/transformers/models/t5/ call  *
    inputs = input_processing(
/usr/local/lib/python3.6/dist-packages/transformers/ input_processing  *
    raise ValueError(

ValueError: The following keyword arguments are not supported by this model: ['token_type_ids'].

Training: 0% 0/6 [00:01<?, ?it/s]`

Do you have a copy of the code which I can run myself? If comfortable, could you share a copy of it please?
I'm very new to Python and ML models. So I might be missing the basic details.
Sorry to bother with long message.


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment