EducationalTestingService / skll

SciKit-Learn Laboratory (SKLL) makes it easy to run machine learning experiments.
http://skll.readthedocs.org
Other
551 stars 67 forks source link

Learning curve generation may be broken due to numpy 1.24.0 #720

Closed desilinguist closed 1 year ago

desilinguist commented 1 year ago

The learning curve tests fail with the following error:

======================================================================
ERROR: Test learning curve output for experiment with objectives option
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/root/sklldev/lib/python3.8/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/builds/EducationalTestingService/skll/tests/test_output.py", line 768, in test_learning_curve_output_with_objectives
    run_configuration(config_path, quiet=True, local=True)
  File "/builds/EducationalTestingService/skll/skll/experiments/__init__.py", line 879, in run_configuration
    generate_learning_curve_plots(experiment_name,
  File "/builds/EducationalTestingService/skll/skll/experiments/output.py", line 153, in generate_learning_curve_plots
    ax.fill_between(list(range(len(df_ax_train))),
  File "/root/sklldev/lib/python3.8/site-packages/matplotlib/__init__.py", line 1423, in inner
    return func(ax, *map(sanitize_sequence, args), **kwargs)
  File "/root/sklldev/lib/python3.8/site-packages/matplotlib/axes/_axes.py", line 5367, in fill_between
    return self._fill_between_x_or_y(
  File "/root/sklldev/lib/python3.8/site-packages/matplotlib/axes/_axes.py", line 5272, in _fill_between_x_or_y
    ind, dep1, dep2 = map(
  File "/root/sklldev/lib/python3.8/site-packages/numpy/ma/core.py", line 2360, in masked_invalid
    return masked_where(~(np.isfinite(getdata(a))), a, copy=copy)
TypeError: ufunc 'isfinite' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''
-------------------- >> begin captured logging << --------------------

For now, a simple workaround is to downgrade to numpy 1.23.5.

desilinguist commented 1 year ago

Looks like this was fixed upstream.