NeuroDiffGym / neurodiffeq

A library for solving differential equations using neural networks based on PyTorch, used by multiple research groups around the world, including at Harvard IACS.
http://pypi.org/project/neurodiffeq/
MIT License
687 stars 90 forks source link

TqdmKeyError: "Unknown argument(s): {'colour': 'blue'}" #170

Closed stanescuUW closed 2 years ago

stanescuUW commented 2 years ago

When installing the latest version and running the first ODE system example on your README page, I get this error. More details:


TqdmKeyError Traceback (most recent call last)

in 6 7 solver = Solver1D(ode_system, conditions, t_min=0.1, t_max=12.0, nets=nets) ----> 8 solver.fit(max_epochs=3000) 9 solution = solver.get_solution() ~/anaconda3/lib/python3.7/site-packages/neurodiffeq/solvers.py in fit(self, max_epochs, callbacks, tqdm_file, **kwargs) 450 colour='blue', 451 file=tqdm_file, --> 452 dynamic_ncols=True, 453 ) 454 ~/anaconda3/lib/python3.7/site-packages/tqdm/notebook.py in __init__(self, *args, **kwargs) 200 kwargs.setdefault('bar_format', '{l_bar}{bar}{r_bar}') 201 kwargs['bar_format'] = kwargs['bar_format'].replace('{bar}', '') --> 202 super(tqdm_notebook, self).__init__(*args, **kwargs) 203 if self.disable or not kwargs['gui']: 204 return ~/anaconda3/lib/python3.7/site-packages/tqdm/std.py in __init__(self, iterable, desc, total, leave, file, ncols, mininterval, maxinterval, miniters, ascii, disable, unit, unit_scale, dynamic_ncols, smoothing, bar_format, initial, position, postfix, unit_divisor, write_bytes, gui, **kwargs) 920 """), fp_write=getattr(file, 'write', sys.stderr.write)) 921 if "nested" in kwargs else --> 922 TqdmKeyError("Unknown argument(s): " + str(kwargs))) 923 924 # Preprocess the arguments TqdmKeyError: "Unknown argument(s): {'colour': 'blue'}"
stanescuUW commented 2 years ago

OK, this seems to be only an old python version issue.

shuheng-liu commented 2 years ago

Could be a tqdm version issue. Can you share the version of tqdm that causes the problem? Try pip list | grep -i tqdm.

stanescuUW commented 2 years ago

The version of tqdm was 4.42.1 (with an environment based on python 3.7.6). A new environment (python 3.9) installed tqdm version 4.64.0 and solved the problem. Thanks!