Giter Club home page Giter Club logo

Comments (13)

namankumar avatar namankumar commented on May 13, 2024 1

A clean hack for saving the best model:

x = automl.show_models()
results = {"ensemble": x}
pickle.dump(results, open('fname.pickle','wb'))

from auto-sklearn.

mfeurer avatar mfeurer commented on May 13, 2024

Hi,
at the moment it is not possible to save the found models to a file. I will leave this issue open to remind us of adding this feature.

from auto-sklearn.

mglowacki100 avatar mglowacki100 commented on May 13, 2024

Hi,
Here is nice approach to saving model:
http://rhiever.github.io/tpot/examples/IRIS_Example/

from auto-sklearn.

mfeurer avatar mfeurer commented on May 13, 2024

This is not the same as the thread creator asked for. You can achieve something similar by using AutoSklearnClassifier.show_models(), which prints you the members of the final ensemble, together with their weight. So far, this is only possible because of the rather simple ensemble considered and will possibly vanish in the near future.

from auto-sklearn.

mfeurer avatar mfeurer commented on May 13, 2024

auto-sklearn supports pickle with commit 9415f38

from auto-sklearn.

devonbrackbill avatar devonbrackbill commented on May 13, 2024

I'm not able to get pickle to work with commit 9415f38. When I install the development branch + the refactor/cleanupcomponents branch and run the test/test_automl/test_pickle.py file I still get the following error: TypeError: Pickling an AuthenticationString object is disallowed for security reasons. Any ideas what I'm doing wrong? Or how I could help make pickle work here?

from auto-sklearn.

mfeurer avatar mfeurer commented on May 13, 2024

Sorry for the late reply. I think there was an error on my side. Can you please try the latest version of the development branch? That should work. Is there any reason why you want to use refactor/cleanupcomonents?

from auto-sklearn.

mfeurer avatar mfeurer commented on May 13, 2024

Sorry, my bad. Of course you wanted to use the branch because the commit was in there. Please only use the development branch now.

from auto-sklearn.

devonbrackbill avatar devonbrackbill commented on May 13, 2024

Thank you! It works on the development branch. My mistake for using the incorrect branch.

from auto-sklearn.

RedLiN5 avatar RedLiN5 commented on May 13, 2024

Hi guys. I've tried 9415f38 to save model.
But I got this error:

File "automl_classification.py", line 73, in main
    pickle.dump(automl, f)
_pickle.PicklingError: Can't pickle <class 'smac.runhistory.runhistory.RunKey'>: attribute lookup RunKey on smac.runhistory.runhistory failed

Does anyone know why it doesn't work?

from auto-sklearn.

mfeurer avatar mfeurer commented on May 13, 2024

See issue #138. A fix is under construction.

from auto-sklearn.

gstempeck avatar gstempeck commented on May 13, 2024

When you save the models using show_models() like namankumar lists, how do you re-load and execute the predict() from the pickle file?

When I pickle.dump(classifierobj) I get a MemoryError but I assume that's the correct way to reload classifierobj to call predict().

from auto-sklearn.

mfeurer avatar mfeurer commented on May 13, 2024

Yes, that's the correct way to do this. I cannot explain when/why this happens as it never occured to me. Could you please provide some information about the data you're using (number of features and number of data points, sparse or not) and your system (especially RAM and bit)?

from auto-sklearn.

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.