Coder Social home page Coder Social logo

Comments (4)

perib avatar perib commented on May 27, 2024

what version of tpot are you using? I was able to reproduce the issue in version 0.12.0, but not 0.12.2 (yet). I haven't nailed down exactly what the issue was but it seems to work for me on the latest version.

from tpot.

jecorn avatar jecorn commented on May 27, 2024

This was with tpot 0.12.1. I just grabbed tpot 1.12.2 and will update when I get a chance to try it out it.

from tpot.

jecorn avatar jecorn commented on May 27, 2024

This was with tpot 0.12.1. I just grabbed tpot 1.12.2 and will update when I get a chance to try it out it.

tpot 0.12.2 can now get past the error. Thanks!

Unfortunately, now there's a different error that I think might be hard to troubleshoot. Running on a single core, tpot starts going through pipelines. But when parallelizing one of the works throws an exception. It might be during a later pipelines (since it doesn't happen on a single core). I'll try to do some digging.

"""
Traceback (most recent call last):
  File "/home/cornlab/miniconda3/envs/jcorn/lib/python3.10/site-packages/joblib/externals/loky/process_executor.py", line 463, in _process_worker
    r = call_item()
  File "/home/cornlab/miniconda3/envs/jcorn/lib/python3.10/site-packages/joblib/externals/loky/process_executor.py", line 291, in __call__
    return self.fn(*self.args, **self.kwargs)
  File "/home/cornlab/miniconda3/envs/jcorn/lib/python3.10/site-packages/joblib/parallel.py", line 589, in __call__
    return [func(*args, **kwargs)
  File "/home/cornlab/miniconda3/envs/jcorn/lib/python3.10/site-packages/joblib/parallel.py", line 589, in <listcomp>
    return [func(*args, **kwargs)
  File "/home/cornlab/miniconda3/envs/jcorn/lib/python3.10/site-packages/stopit/utils.py", line 145, in wrapper
    result = func(*args, **kwargs)
  File "/home/cornlab/miniconda3/envs/jcorn/lib/python3.10/site-packages/tpot/gp_deap.py", line 424, in _wrapped_cross_val_score
    cv_iter = list(cv.split(features, target, groups))
  File "/home/cornlab/miniconda3/envs/jcorn/lib/python3.10/site-packages/sklearn/model_selection/_split.py", line 808, in split
    y = check_array(y, input_name="y", ensure_2d=False, dtype=None)
  File "/home/cornlab/miniconda3/envs/jcorn/lib/python3.10/site-packages/sklearn/utils/validation.py", line 1097, in check_array
    array.flags.writeable = True
ValueError: cannot set WRITEABLE flag to True of this array
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/cornlab/miniconda3/envs/jcorn/lib/python3.10/site-packages/tpot/base.py", line 817, in fit
    self._pop, _ = eaMuPlusLambda(
  File "/home/cornlab/miniconda3/envs/jcorn/lib/python3.10/site-packages/tpot/gp_deap.py", line 232, in eaMuPlusLambda
    population[:] = toolbox.evaluate(population)
  File "/home/cornlab/miniconda3/envs/jcorn/lib/python3.10/site-packages/tpot/base.py", line 1575, in _evaluate_individuals
    tmp_result_scores = parallel(
  File "/home/cornlab/miniconda3/envs/jcorn/lib/python3.10/site-packages/joblib/parallel.py", line 1952, in __call__
    return output if self.return_generator else list(output)
  File "/home/cornlab/miniconda3/envs/jcorn/lib/python3.10/site-packages/joblib/parallel.py", line 1595, in _get_outputs
    yield from self._retrieve()
  File "/home/cornlab/miniconda3/envs/jcorn/lib/python3.10/site-packages/joblib/parallel.py", line 1699, in _retrieve
    self._raise_error_fast()
  File "/home/cornlab/miniconda3/envs/jcorn/lib/python3.10/site-packages/joblib/parallel.py", line 1734, in _raise_error_fast
    error_job.get_result(self.timeout)
  File "/home/cornlab/miniconda3/envs/jcorn/lib/python3.10/site-packages/joblib/parallel.py", line 736, in get_result
    return self._return_or_raise()
  File "/home/cornlab/miniconda3/envs/jcorn/lib/python3.10/site-packages/joblib/parallel.py", line 754, in _return_or_raise
    raise self._result
ValueError: cannot set WRITEABLE flag to True of this array

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/mnt/data/jcorn/autodisco/scripts/auto_tpot.py", line 39, in <module>
    pipeline_optimizer.fit(X, y)
  File "/home/cornlab/miniconda3/envs/jcorn/lib/python3.10/site-packages/tpot/base.py", line 864, in fit
    raise e
  File "/home/cornlab/miniconda3/envs/jcorn/lib/python3.10/site-packages/tpot/base.py", line 855, in fit
    self._update_top_pipeline()
  File "/home/cornlab/miniconda3/envs/jcorn/lib/python3.10/site-packages/tpot/base.py", line 963, in _update_top_pipeline
    raise RuntimeError(
RuntimeError: A pipeline has not yet been optimized. Please call fit() first.

from tpot.

perib avatar perib commented on May 27, 2024

I've come across this error at some point too, but it seems to be working on my machine now. IIRC it was due to a package version issue. Try updating the packages, I think my issue was with an outdated version of pandas or numpy?

from tpot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.