traceback.print_exc()
continue
model2 = pickle.loads(pickle.dumps(model))
np.testing.assert_almost_equal(model(iris), model2(iris),
err_msg="%s does not return same values when unpickled" % learner.__name__)
After Change
for ds in datasets:
model = learner(ds)
s = pickle.dumps(model, 0)model2 = pickle.loads(s)
np.testing.assert_almost_equal(Table(model.domain, ds).X, Table(model2.domain, ds).X)
np.testing.assert_almost_equal(model(ds), model2(ds),
err_msg="%s does not return same values when unpickled %s" % (learner.__class__.__name__, ds.name))