I'm facing import error while executing the ludwig from google colab.. !!
Below is the code which I executed in steps:
Loading Ludwig
!pip install ludwig
Upload file from local to Drive - to use in Colab
from google.colab import files
uploaded = files.upload()
Train DataSet using ludwig cmd
!ludwig train --data_csv ludwig_traindataset_1.csv --model_definition_file model_def.yaml
My model_def.yaml
input_features:
- name: utterance
type: sequence
encoder: rnn
cell_type: lstm
bidirectional: true
num_layers: 2
reduce_output: None
output_features:
- name: intent
type: category
reduce_input: sum
num_fc_layers: 1
fc_size: 64
- name: slots
type: sequence
decoder: tagger
Dummy Dataset:

Attached the screenshot error:

Can anyone help me on this in _Google Colab GPU / Python 3.6_
Looking into it.
So it turns out mpl.use('TKAgg') was needed to render windows in Mac OS X in older versions of matplotlib. I removed it and increased the matplotlib version in the requirements.
Please confirm this solves the issue.
@w4nderlust pip is pulling only the old release version not newer one. :( because the error is still throwing which points to older code.
Yes I will update to version 0.1.1 once enough bugs are fixed. In the mean time can you please try with pip install https://github.com/uber/ludwig/archive/master.zip which should install the current code in the master branch?
@w4nderlust _TkAgg issue got fixed_ but am getting KeyError: utterance error.


That is likely a problem with your data. Lookin at the screenshot you posted, you are escaping commas that separate columns, you should not do that, you should only escape commas if you have them inside strings. Closing this as the original issue is solved, let me know if fixing the dataset doesn't solve the problem.
@w4nderlust worked like a charm 馃憤
Glad it worked!
What solved the problem for me was to restart my kernel, import the following first:
import matplotlib
matplotlib.use('TKAgg')
Then,
import matplotlib.pyplot as plt
What solved the problem for me was to restart my kernel, import the following first:
import matplotlib
matplotlib.use('TKAgg')
Then,
import matplotlib.pyplot as plt
You probably imported matplotlib with another framework before you tried to change to TKAgg. Restart your kernel.
Most helpful comment
Yes I will update to version 0.1.1 once enough bugs are fixed. In the mean time can you please try with
pip install https://github.com/uber/ludwig/archive/master.zipwhich should install the current code in the master branch?