list index out of range on Keras train_on_batch - python
I have a simple matrix called timeseries:
[1,2,3,4,5]
[6,7,8,9,10]
[1,3,5,7,9]
[2,4,6,8,10]
I wanna perform RNN model.train_on_batch(timeseries[:,0:1], timeseries[:, 1]),
but it gave me the error list index out of range
The network I build is like this
model = Sequential()
if args.layers == 1:
model.add(LSTM(args.neurons, batch_input_shape=(num_timeseries, 1, num_dims), return_sequences=False, stateful=True))
else:
model.add(LSTM(args.neurons, batch_input_shape=(num_timeseries, 1, num_dims), return_sequences=True, stateful=True))
for i in range(args.layers - 2):
model.add(LSTM(args.neurons, return_sequences=True, stateful=True))
model.add(LSTM(args.neurons, return_sequences=False, stateful=True))
num_mixture_components = args.mixture_components
model.add(Dense((num_dims + 2) * num_mixture_components))
model.add(GMMActivation(num_mixture_components))
model.compile(loss=gmm_loss, optimizer=RMSprop(lr=args.learning_rate))
The error log is
ERROR (theano.gof.opt): Optimization failure due to: LocalOptGroup(use_c_ger,use_c_gemv)
ERROR (theano.gof.opt): node: Gemv{no_inplace}(AllocEmpty{dtype='float32'}.0, TensorConstant{1.0}, InplaceDimShuffle{1,0}.0, Reshape{1}.0, TensorConstant{0.0})
ERROR (theano.gof.opt): TRACEBACK:
ERROR (theano.gof.opt): Traceback (most recent call last):
File "/Users/LaurenceLuo/anaconda/lib/python2.7/site-packages/theano/gof/opt.py", line 1922, in process_node
replacements = lopt.transform(node)
File "/Users/LaurenceLuo/anaconda/lib/python2.7/site-packages/theano/gof/opt.py", line 1309, in transform
new_repl = opt.transform(node)
File "/Users/LaurenceLuo/anaconda/lib/python2.7/site-packages/theano/tensor/blas_c.py", line 674, in use_c_gemv
if not config.blas.ldflags:
File "/Users/LaurenceLuo/anaconda/lib/python2.7/site-packages/theano/configparser.py", line 328, in __get__
val_str = self.default()
File "/Users/LaurenceLuo/anaconda/lib/python2.7/site-packages/theano/configdefaults.py", line 1258, in default_blas_ldflags
lib_path = blas_info.get('library_dirs', [])[0]
IndexError: list index out of range
ERROR (theano.gof.opt): Optimization failure due to: LocalOptGroup(use_c_ger,use_c_gemv)
ERROR (theano.gof.opt): node: Gemv{no_inplace}(AllocEmpty{dtype='float32'}.0, TensorConstant{1.0}, InplaceDimShuffle{1,0}.0, Reshape{1}.0, TensorConstant{0.0})
ERROR (theano.gof.opt): TRACEBACK:
ERROR (theano.gof.opt): Traceback (most recent call last):
File "/Users/LaurenceLuo/anaconda/lib/python2.7/site-packages/theano/gof/opt.py", line 1922, in process_node
replacements = lopt.transform(node)
File "/Users/LaurenceLuo/anaconda/lib/python2.7/site-packages/theano/gof/opt.py", line 1309, in transform
new_repl = opt.transform(node)
File "/Users/LaurenceLuo/anaconda/lib/python2.7/site-packages/theano/tensor/blas_c.py", line 674, in use_c_gemv
if not config.blas.ldflags:
File "/Users/LaurenceLuo/anaconda/lib/python2.7/site-packages/theano/configparser.py", line 328, in __get__
val_str = self.default()
File "/Users/LaurenceLuo/anaconda/lib/python2.7/site-packages/theano/configdefaults.py", line 1258, in default_blas_ldflags
lib_path = blas_info.get('library_dirs', [])[0]
IndexError: list index out of range
ERROR (theano.gof.opt): Optimization failure due to: LocalOptGroup(use_c_ger,use_c_gemv)
ERROR (theano.gof.opt): node: Gemv{no_inplace}(AllocEmpty{dtype='float32'}.0, TensorConstant{1.0}, InplaceDimShuffle{1,0}.0, Reshape{1}.0, TensorConstant{0.0})
ERROR (theano.gof.opt): TRACEBACK:
ERROR (theano.gof.opt): Traceback (most recent call last):
File "/Users/LaurenceLuo/anaconda/lib/python2.7/site-packages/theano/gof/opt.py", line 1922, in process_node
replacements = lopt.transform(node)
File "/Users/LaurenceLuo/anaconda/lib/python2.7/site-packages/theano/gof/opt.py", line 1309, in transform
new_repl = opt.transform(node)
File "/Users/LaurenceLuo/anaconda/lib/python2.7/site-packages/theano/tensor/blas_c.py", line 674, in use_c_gemv
if not config.blas.ldflags:
File "/Users/LaurenceLuo/anaconda/lib/python2.7/site-packages/theano/configparser.py", line 328, in __get__
val_str = self.default()
File "/Users/LaurenceLuo/anaconda/lib/python2.7/site-packages/theano/configdefaults.py", line 1258, in default_blas_ldflags
lib_path = blas_info.get('library_dirs', [])[0]
IndexError: list index out of range
ERROR (theano.gof.opt): Optimization failure due to: LocalOptGroup(use_c_ger,use_c_gemv)
ERROR (theano.gof.opt): node: Gemv{no_inplace}(AllocEmpty{dtype='float32'}.0, TensorConstant{1.0}, InplaceDimShuffle{1,0}.0, Reshape{1}.0, TensorConstant{0.0})
ERROR (theano.gof.opt): TRACEBACK:
ERROR (theano.gof.opt): Traceback (most recent call last):
File "/Users/LaurenceLuo/anaconda/lib/python2.7/site-packages/theano/gof/opt.py", line 1922, in process_node
replacements = lopt.transform(node)
File "/Users/LaurenceLuo/anaconda/lib/python2.7/site-packages/theano/gof/opt.py", line 1309, in transform
new_repl = opt.transform(node)
File "/Users/LaurenceLuo/anaconda/lib/python2.7/site-packages/theano/tensor/blas_c.py", line 674, in use_c_gemv
if not config.blas.ldflags:
File "/Users/LaurenceLuo/anaconda/lib/python2.7/site-packages/theano/configparser.py", line 328, in __get__
val_str = self.default()
File "/Users/LaurenceLuo/anaconda/lib/python2.7/site-packages/theano/configdefaults.py", line 1258, in default_blas_ldflags
lib_path = blas_info.get('library_dirs', [])[0]
IndexError: list index out of range
ERROR (theano.gof.opt): Optimization failure due to: Elemwise{sub,no_inplace}(z, Elemwise{mul,no_inplace}(alpha subject to <function <lambda> at 0x10afdb5f0>, SparseDot(x, y))) -> Usmm{no_inplace}(Elemwise{neg,no_inplace}(alpha), x, y, z)
ERROR (theano.gof.opt): node: Elemwise{sub,no_inplace}(Elemwise{add,no_inplace}.0, Elemwise{mul,no_inplace}.0)
ERROR (theano.gof.opt): TRACEBACK:
ERROR (theano.gof.opt): Traceback (most recent call last):
File "/Users/LaurenceLuo/anaconda/lib/python2.7/site-packages/theano/gof/opt.py", line 1922, in process_node
replacements = lopt.transform(node)
File "/Users/LaurenceLuo/anaconda/lib/python2.7/site-packages/theano/gof/opt.py", line 1673, in transform
self.pdb)
File "/Users/LaurenceLuo/anaconda/lib/python2.7/site-packages/theano/gof/opt.py", line 1631, in match
u = match(p, v, u, self.allow_multiple_clients)
File "/Users/LaurenceLuo/anaconda/lib/python2.7/site-packages/theano/gof/opt.py", line 1631, in match
u = match(p, v, u, self.allow_multiple_clients)
File "/Users/LaurenceLuo/anaconda/lib/python2.7/site-packages/theano/gof/opt.py", line 1642, in match
if constraint(expr):
File "/Users/LaurenceLuo/anaconda/lib/python2.7/site-packages/theano/sparse/opt.py", line 883, in <lambda>
theano.config.blas.ldflags)},
File "/Users/LaurenceLuo/anaconda/lib/python2.7/site-packages/theano/configparser.py", line 328, in __get__
val_str = self.default()
File "/Users/LaurenceLuo/anaconda/lib/python2.7/site-packages/theano/configdefaults.py", line 1258, in default_blas_ldflags
lib_path = blas_info.get('library_dirs', [])[0]
IndexError: list index out of range
Traceback (most recent call last):
File "RNN_test.py", line 101, in <module>
results = model.train_on_batch(timeseries[:,i:i+1], timeseries[:, i])
File "/Users/LaurenceLuo/anaconda/lib/python2.7/site-packages/keras/models.py", line 712, in train_on_batch
class_weight=class_weight)
File "/Users/LaurenceLuo/anaconda/lib/python2.7/site-packages/keras/engine/training.py", line 1220, in train_on_batch
self._make_train_function()
File "/Users/LaurenceLuo/anaconda/lib/python2.7/site-packages/keras/engine/training.py", line 703, in _make_train_function
**self._function_kwargs)
File "/Users/LaurenceLuo/anaconda/lib/python2.7/site-packages/keras/backend/theano_backend.py", line 727, in function
return Function(inputs, outputs, updates=updates, **kwargs)
File "/Users/LaurenceLuo/anaconda/lib/python2.7/site-packages/keras/backend/theano_backend.py", line 713, in __init__
**kwargs)
File "/Users/LaurenceLuo/anaconda/lib/python2.7/site-packages/theano/compile/function.py", line 326, in function
output_keys=output_keys)
File "/Users/LaurenceLuo/anaconda/lib/python2.7/site-packages/theano/compile/pfunc.py", line 486, in pfunc
output_keys=output_keys)
File "/Users/LaurenceLuo/anaconda/lib/python2.7/site-packages/theano/compile/function_module.py", line 1784, in orig_function
defaults)
File "/Users/LaurenceLuo/anaconda/lib/python2.7/site-packages/theano/compile/function_module.py", line 1651, in create
input_storage=input_storage_lists, storage_map=storage_map)
File "/Users/LaurenceLuo/anaconda/lib/python2.7/site-packages/theano/gof/link.py", line 699, in make_thunk
storage_map=storage_map)[:3]
File "/Users/LaurenceLuo/anaconda/lib/python2.7/site-packages/theano/gof/vm.py", line 1057, in make_all
impl=impl))
File "/Users/LaurenceLuo/anaconda/lib/python2.7/site-packages/theano/gof/op.py", line 924, in make_thunk
no_recycling)
File "/Users/LaurenceLuo/anaconda/lib/python2.7/site-packages/theano/gof/op.py", line 828, in make_c_thunk
output_storage=node_output_storage)
File "/Users/LaurenceLuo/anaconda/lib/python2.7/site-packages/theano/gof/cc.py", line 1190, in make_thunk
keep_lock=keep_lock)
File "/Users/LaurenceLuo/anaconda/lib/python2.7/site-packages/theano/gof/cc.py", line 1131, in __compile__
keep_lock=keep_lock)
File "/Users/LaurenceLuo/anaconda/lib/python2.7/site-packages/theano/gof/cc.py", line 1578, in cthunk_factory
key = self.cmodule_key()
File "/Users/LaurenceLuo/anaconda/lib/python2.7/site-packages/theano/gof/cc.py", line 1268, in cmodule_key
compile_args=self.compile_args(),
File "/Users/LaurenceLuo/anaconda/lib/python2.7/site-packages/theano/gof/cc.py", line 944, in compile_args
ret += x.c_compile_args()
File "/Users/LaurenceLuo/anaconda/lib/python2.7/site-packages/theano/tensor/blas.py", line 501, in c_compile_args
return ldflags(libs=False, flags=True)
File "/Users/LaurenceLuo/anaconda/lib/python2.7/site-packages/theano/tensor/blas.py", line 381, in ldflags
ldflags_str = theano.config.blas.ldflags
File "/Users/LaurenceLuo/anaconda/lib/python2.7/site-packages/theano/configparser.py", line 328, in __get__
val_str = self.default()
File "/Users/LaurenceLuo/anaconda/lib/python2.7/site-packages/theano/configdefaults.py", line 1258, in default_blas_ldflags
lib_path = blas_info.get('library_dirs', [])[0]
IndexError: ('The following error happened while compiling the node', Dot22(InplaceDimShuffle{0,x}.0, lstm_1_W_o), '\n', 'list index out of range')
Thank you!
Related
File contains data in an unknown format. (m4a load from librosa)
So I am currently working on a DNN that takes in m4a files. I have ffmpeg, it creates a few batches and then dies on this error: Traceback (most recent call last): File "/users/work/s163838/./main.py", line 126, in <module> File "/users/work/s163838/./main.py", line 96, in main print("e") File "/apl/tryton/python/3.9.5/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 521, in __next__ data = self._next_data() File "/apl/tryton/python/3.9.5/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 1203, in _next_data return self._process_data(data) File "/apl/tryton/python/3.9.5/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 1229, in _process_data data.reraise() File "/apl/tryton/python/3.9.5/lib/python3.9/site-packages/torch/_utils.py", line 425, in reraise raise self.exc_type(msg) EOFError: Caught EOFError in DataLoader worker process 0. Original Traceback (most recent call last): File "/users/kdm/s163838/.local/lib/python3.9/site-packages/librosa/core/audio.py", line 164, in load y, sr_native = __soundfile_load(path, offset, duration, dtype) File "/users/kdm/s163838/.local/lib/python3.9/site-packages/librosa/core/audio.py", line 195, in __soundfile_load context = sf.SoundFile(path) File "/users/kdm/s163838/.local/lib/python3.9/site-packages/soundfile.py", line 629, in __init__ self._file = self._open(file, mode_int, closefd) File "/users/kdm/s163838/.local/lib/python3.9/site-packages/soundfile.py", line 1183, in _open _error_check(_snd.sf_error(file_ptr), File "/users/kdm/s163838/.local/lib/python3.9/site-packages/soundfile.py", line 1357, in _error_check raise RuntimeError(prefix + _ffi.string(err_str).decode('utf-8', 'replace')) RuntimeError: Error opening 'vox2/dev/aac/id08194/QnBYPze-x9A/00079.m4a': File contains data in an unknown format. During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/apl/tryton/python/3.9.5/lib/python3.9/site-packages/torch/utils/data/_utils/worker.py", line 287, in _worker_loop data = fetcher.fetch(index) File "/apl/tryton/python/3.9.5/lib/python3.9/site-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch data = [self.dataset[idx] for idx in possibly_batched_index] File "/apl/tryton/python/3.9.5/lib/python3.9/site-packages/torch/utils/data/_utils/fetch.py", line 44, in <listcomp> data = [self.dataset[idx] for idx in possibly_batched_index] File "/users/work/s163838/vox_celeb_loader.py", line 53, in __getitem__ load(speaker2utt1, self.num_samples) File "/users/work/s163838/vox_celeb_loader.py", line 13, in load wav, sr = librosa.load(path, sr=16000) File "/users/kdm/s163838/.local/lib/python3.9/site-packages/librosa/util/decorators.py", line 88, in inner_f return f(*args, **kwargs) File "/users/kdm/s163838/.local/lib/python3.9/site-packages/librosa/core/audio.py", line 170, in load y, sr_native = __audioread_load(path, offset, duration, dtype) File "/users/kdm/s163838/.local/lib/python3.9/site-packages/librosa/core/audio.py", line 226, in __audioread_load reader = audioread.audio_open(path) File "/users/kdm/s163838/.local/lib/python3.9/site-packages/audioread/__init__.py", line 111, in audio_open return BackendClass(path) File "/users/kdm/s163838/.local/lib/python3.9/site-packages/audioread/rawread.py", line 65, in __init__ self._file = aifc.open(self._fh) File "/apl/tryton/python/3.9.5/lib/python3.9/aifc.py", line 917, in open return Aifc_read(f) File "/apl/tryton/python/3.9.5/lib/python3.9/aifc.py", line 358, in __init__ self.initfp(f) File "/apl/tryton/python/3.9.5/lib/python3.9/aifc.py", line 314, in initfp chunk = Chunk(file) File "/apl/tryton/python/3.9.5/lib/python3.9/chunk.py", line 63, in __init__ raise EOFError EOFError I am using this command wav, sr = librosa.load(path, sr=16000) is it just a broken file? How do I skip such then? Or is it something about loading a m4a file even with ffmpeg and the desired output when tested on a single m4a file?
Pandas plotting routine fails with NoneType is not callable, but only when run inside pdb
The following code If I run the following code in pdb (i.e. with python -m pdb) if __name__=='__main__': import pandas as pd df=pd.DataFrame([[0,1,2],[63,146, 135]]) df.plot.area() it fails with a TypeError inside a numpy routine that's called by matplotlib: > python -m pdb test_dtype.py > /home/jhaiduce/financial/forecasting/test_dtype.py(1)<module>() -> if __name__=='__main__': (Pdb) r QSocketNotifier: Can only be used with threads started with QThread --Return-- > /home/jhaiduce/financial/forecasting/test_dtype.py(6)<module>()->None -> df.plot.area() (Pdb) c Traceback (most recent call last): File "/usr/lib64/python3.10/site-packages/numpy/core/getlimits.py", line 384, in __new__ dtype = numeric.dtype(dtype) TypeError: 'NoneType' object is not callable During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.10/pdb.py", line 1726, in main pdb._runscript(mainpyfile) File "/usr/lib64/python3.10/pdb.py", line 1586, in _runscript self.run(statement) File "/usr/lib64/python3.10/bdb.py", line 597, in run exec(cmd, globals, locals) File "<string>", line 1, in <module> File "/home/jhaiduce/financial/forecasting/test_dtype.py", line 6, in <module> df.plot.area() File "/usr/lib64/python3.10/site-packages/pandas/plotting/_core.py", line 1496, in area return self(kind="area", x=x, y=y, **kwargs) File "/usr/lib64/python3.10/site-packages/pandas/plotting/_core.py", line 972, in __call__ return plot_backend.plot(data, kind=kind, **kwargs) File "/usr/lib64/python3.10/site-packages/pandas/plotting/_matplotlib/__init__.py", line 71, in plot plot_obj.generate() File "/usr/lib64/python3.10/site-packages/pandas/plotting/_matplotlib/core.py", line 294, in generate self._post_plot_logic_common(ax, self.data) File "/usr/lib64/python3.10/site-packages/pandas/plotting/_matplotlib/core.py", line 473, in _post_plot_logic_common self._apply_axis_properties(ax.xaxis, rot=self.rot, fontsize=self.fontsize) File "/usr/lib64/python3.10/site-packages/pandas/plotting/_matplotlib/core.py", line 561, in _apply_axis_properties labels = axis.get_majorticklabels() + axis.get_minorticklabels() File "/usr/lib64/python3.10/site-packages/matplotlib/axis.py", line 1201, in get_majorticklabels ticks = self.get_major_ticks() File "/usr/lib64/python3.10/site-packages/matplotlib/axis.py", line 1371, in get_major_ticks numticks = len(self.get_majorticklocs()) File "/usr/lib64/python3.10/site-packages/matplotlib/axis.py", line 1277, in get_majorticklocs return self.major.locator() File "/usr/lib64/python3.10/site-packages/matplotlib/ticker.py", line 2113, in __call__ vmin, vmax = self.axis.get_view_interval() File "/usr/lib64/python3.10/site-packages/matplotlib/axis.py", line 1987, in getter return getattr(getattr(self.axes, lim_name), attr_name) File "/usr/lib64/python3.10/site-packages/matplotlib/axes/_base.py", line 781, in viewLim self._unstale_viewLim() File "/usr/lib64/python3.10/site-packages/matplotlib/axes/_base.py", line 776, in _unstale_viewLim self.autoscale_view(**{f"scale{name}": scale File "/usr/lib64/python3.10/site-packages/matplotlib/axes/_base.py", line 2932, in autoscale_view handle_single_axis( File "/usr/lib64/python3.10/site-packages/matplotlib/axes/_base.py", line 2895, in handle_single_axis x0, x1 = locator.nonsingular(x0, x1) File "/usr/lib64/python3.10/site-packages/matplotlib/ticker.py", line 1654, in nonsingular return mtransforms.nonsingular(v0, v1, expander=.05) File "/usr/lib64/python3.10/site-packages/matplotlib/transforms.py", line 2880, in nonsingular if maxabsvalue < (1e6 / tiny) * np.finfo(float).tiny: File "/usr/lib64/python3.10/site-packages/numpy/core/getlimits.py", line 387, in __new__ dtype = numeric.dtype(type(dtype)) TypeError: 'NoneType' object is not callable Uncaught exception. Entering post mortem debugging Running 'cont' or 'step' will restart the program > /usr/lib64/python3.10/site-packages/numpy/core/getlimits.py(387)__new__() -> dtype = numeric.dtype(type(dtype)) (Pdb) The error occurs only when run in the debugger; the program runs as normal when run outside the debugger. Any idea what could be the cause of this?
Exception occurs in for statement itself
I have an exception occurring in a for statement: for _, data in enumerate(dataloader, 0): Not in the body of the for statement, but in the for statement itself. How do I catch this and continue? Here is the entire error trace: Traceback (most recent call last): File "/home/miran045/reine097/projects/AlexNet_Abrol2021/reprex/run_DL.py", line 67, in <module> ut.generate_validation_model(cfg) File "/panfs/roc/groups/4/miran045/reine097/projects/AlexNet_Abrol2021/reprex/utils.py", line 227, in generate_validation_model loss = train(trainloader, net, optimizer, criterion, cfg.cuda_avl) File "/panfs/roc/groups/4/miran045/reine097/projects/AlexNet_Abrol2021/reprex/utils.py", line 96, in train for _, data in enumerate(dataloader, 0): File "/home/miran045/reine097/projects/AlexNet_Abrol2021/venv/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 521, in __next__ data = self._next_data() File "/home/miran045/reine097/projects/AlexNet_Abrol2021/venv/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 1203, in _next_data return self._process_data(data) File "/home/miran045/reine097/projects/AlexNet_Abrol2021/venv/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 1229, in _process_data data.reraise() File "/home/miran045/reine097/projects/AlexNet_Abrol2021/venv/lib/python3.9/site-packages/torch/_utils.py", line 434, in reraise raise exception RuntimeError: Caught RuntimeError in DataLoader worker process 0. Original Traceback (most recent call last): File "/home/miran045/reine097/projects/AlexNet_Abrol2021/venv/lib/python3.9/site-packages/torch/utils/data/_utils/worker.py", line 287, in _worker_loop data = fetcher.fetch(index) File "/home/miran045/reine097/projects/AlexNet_Abrol2021/venv/lib/python3.9/site-packages/torch/utils/data/_utils/fetch.py", line 52, in fetch return self.collate_fn(data) File "/home/miran045/reine097/projects/AlexNet_Abrol2021/venv/lib/python3.9/site-packages/torch/utils/data/_utils/collate.py", line 84, in default_collate return [default_collate(samples) for samples in transposed] File "/home/miran045/reine097/projects/AlexNet_Abrol2021/venv/lib/python3.9/site-packages/torch/utils/data/_utils/collate.py", line 84, in <listcomp> return [default_collate(samples) for samples in transposed] File "/home/miran045/reine097/projects/AlexNet_Abrol2021/venv/lib/python3.9/site-packages/torch/utils/data/_utils/collate.py", line 64, in default_collate return default_collate([torch.as_tensor(b) for b in batch]) File "/home/miran045/reine097/projects/AlexNet_Abrol2021/venv/lib/python3.9/site-packages/torch/utils/data/_utils/collate.py", line 56, in default_collate return torch.stack(batch, 0, out=out) RuntimeError: stack expects each tensor to be equal size, but got [1, 208, 300, 320] at entry 0 and [1, 320, 300, 208] at entry 13 The error occurs on this line: File "/panfs/roc/groups/4/miran045/reine097/projects/AlexNet_Abrol2021/reprex/utils.py", line 96, in train for _, data in enumerate(dataloader, 0):
jinja2.exceptions.UndefinedError: 'loop' is undefined odoo 13
I am new to odoo, while generating an invoice an error occurred like Failed to render template %r using values %r. And I have added the full trace of the error below. Traceback (most recent call last): File "/opt/odoo13/addons/payment/controllers/portal.py", line 104, in payment_status_poll tx_to_process._post_process_after_done() File "/opt/odoo13/addons/payment/models/payment_acquirer.py", line 872, in _post_process_after_done self._reconcile_after_transaction_done() File "/opt/odoo13/addons/sale/models/payment.py", line 112, in _reconcile_after_transaction_done sales_orders._send_order_confirmation_mail() File "/opt/odoo13/addons/sale/models/sale.py", line 817, in _send_order_confirmation_mail order.with_context(force_send=True).message_post_with_template(template_id, composition_mode='comment', email_layout_xmlid="mail.mail_notification_paynow") File "/opt/odoo13/addons/mass_mailing/models/mail_thread.py", line 37, in message_post_with_template return super(MailThread, no_massmail).message_post_with_template(template_id, **kwargs) File "/opt/odoo13/addons/mail/models/mail_thread.py", line 1998, in message_post_with_template update_values = composer.onchange_template_id(template_id, kwargs['composition_mode'], self._name, res_id)['value'] File "/opt/odoo13/addons/mail/wizard/mail_compose_message.py", line 405, in onchange_template_id values = self.generate_email_for_composer(template_id, [res_id])[res_id] File "/opt/odoo13/addons/mail/wizard/mail_compose_message.py", line 538, in generate_email_for_composer template_values = self.env['mail.template'].with_context(tpl_partners_only=True).browse(template_id).generate_email(res_ids, fields=fields) File "/opt/odoo13/addons/mail/models/mail_template.py", line 401, in generate_email generated_field_values = Template._render_template( File "/opt/odoo13/addons/mail/models/mail_template.py", line 290, in _render_template raise UserError(_("Failed to render template %r using values %r") % (template, variables)
TypeError: _get_dataset_for_single_task() got an unexpected keyword argument 'sequence_length' #790
I got the following error in the evaluation of a t5 model: model.batch_size = train_batch_size * 4 model.eval( mixture_or_task_name="trivia_all", checkpoint_steps=-1 #"all" ) Traceback (most recent call last): File "train.py", line 140, in <module> checkpoint_steps=-1 #"all" File "/home/pouramini/miniconda3/lib/python3.7/site-packages/t5/models/mtf_model.py", line 267, in eval self._model_dir, dataset_fn, summary_dir, checkpoint_steps) File "/home/pouramini/miniconda3/lib/python3.7/site-packages/mesh_tensorflow/transformer/utils.py", line 2025, in eval_model for d in decode(estimator, input_fn, vocabulary, checkpoint_path) File "/home/pouramini/miniconda3/lib/python3.7/site-packages/mesh_tensorflow/transformer/utils.py", line 2024, in <listcomp> d.decode("utf-8") if isinstance(d, bytes) else d File "/home/pouramini/miniconda3/lib/python3.7/site-packages/mesh_tensorflow/transformer/utils.py", line 1114, in decode for i, result in enumerate(result_iter): File "/home/pouramini/miniconda3/lib/python3.7/site-packages/tensorflow_estimator/python/estimator/tpu/tpu_estimator.py", line 3132, in predict rendezvous.raise_errors() File "/home/pouramini/miniconda3/lib/python3.7/site-packages/tensorflow_estimator/python/estimator/tpu/error_handling.py", line 150, in raise_errors six.reraise(typ, value, traceback) File "/home/pouramini/miniconda3/lib/python3.7/site-packages/six.py", line 703, in reraise raise value File "/home/pouramini/miniconda3/lib/python3.7/site-packages/tensorflow_estimator/python/estimator/tpu/tpu_estimator.py", line 3126, in predict yield_single_examples=yield_single_examples): File "/home/pouramini/miniconda3/lib/python3.7/site-packages/tensorflow_estimator/python/estimator/estimator.py", line 611, in predict input_fn, ModeKeys.PREDICT) File "/home/pouramini/miniconda3/lib/python3.7/site-packages/tensorflow_estimator/python/estimator/estimator.py", line 1007, in _get_features_from_input_fn result = self._call_input_fn(input_fn, mode) File "/home/pouramini/miniconda3/lib/python3.7/site-packages/tensorflow_estimator/python/estimator/tpu/tpu_estimator.py", line 3041, in _call_input_fn return input_fn(**kwargs) File "/home/pouramini/miniconda3/lib/python3.7/site-packages/mesh_tensorflow/transformer/utils.py", line 1182, in input_fn ds = dataset.dataset_fn(sequence_length=sequence_length) TypeError: _get_dataset_for_single_task() got an unexpected keyword argument 'sequence_length' There is a similar issue but I didn't get the solution which is one line. https://github.com/google-research/text-to-text-transfer-transformer/issues/631
I had installed t5 v0.6.0, which wasn't the newest version. When I installed v0.9.0, the problem was resolved. pip install t5==0.9.0