GithubHelp home page GithubHelp logo

automl / autofolio Goto Github PK

View Code? Open in Web Editor NEW
34.0 5.0 11.0 2.95 MB

Automated Algorithm Selection with Hyperparameter Optimization

Home Page: https://www.automl.org

License: BSD 2-Clause "Simplified" License

Python 100.00%
algorithm-selection

autofolio's People

Contributors

bmmalone avatar brenting avatar hadarshavit avatar masterblasterz avatar mlindauer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

autofolio's Issues

AFCsvFacade.load_and_predict() returns the first item in the schedule

The facade API is really useful. However, when called to make a prediction it picks the first item in a schedule, i.e. the item with the shortest allocated budget. Is this intentional?

E.g. my problem sets the runtime limit to 3600 and in the AF logging output I get
Selected Schedule [(algorithm, budget)]: [('algo_tree', 1), ('algo_mdd',3601)]
But the output from AFCsvFacade.load_and_predict() just returns algo_tree. This is because the method (src) just returns pred[0][0].

Is this correct / intended? If only 1 sec of budget is set to algo_tree, but 3601 to algo_mdd, but I can only use 1 choice, which should it be? Perhaps I'm misunderstanding.

Update PCS instead of yaml

The yaml file to modify the pcs is fine for now,
but it would be more convenient to pass a pcs file which updates the current pcs.

Output

Hello,
I'm trying to use Autofolio for a project on an ASlib scenario. I ran the example ASlib scenario, and information about what appears to be different models gets printed to the console. However, I cannot find a resource that explains how to use this information or what the recommended model should be. Could I get some information about this?
Thank you,
Austin

About running AutoFolio with option '--tune'

Hi, I want use AutoFolio to train a algorithm selector from a collection of algorithms. However, I encounter an issue with using option '-t'. For example, I have two csv files for storing feature data (each instance has 54 features, i.e., the size of each instance's feature vector is 54) and performance data (using runtime as performance metric), respectively.

I first run the command to construct the portfolio selector:
python3.5 <AutoFolio_Path>/AutoFolio-master/scripts/autofolio --performance_csv <Performance_Data_Path>/performance_data.csv --feature_csv <Feature_Data_Path>/ [csv_files.zip](https://github.com/mlindauer/AutoFolio/files/1205204/csv_files.zip) feature_data.csv --objective runtime --runtime_cutoff 10 --tune --save autofolio_test

Then I run the command to run the portfolio selector:
python3.5 Components/AutoFolio-master/scripts/autofolio --load autofolio_test --feature_vec [54 float numbers separated by space (character ' ')]

The terminal outputs:

/usr/local/lib/python3.5/dist-packages/sklearn/cross_validation.py:44: DeprecationWarning: This module was deprecated in version 0.18 in favor of the model_selection module into which all the refactored classes and functions are moved. Also note that the interface of the new CV iterators are different from that of this module. This module will be removed in 0.20.
"This module will be removed in 0.20.", DeprecationWarning)
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/pandas/core/internals.py", line 4294, in create_block_manager_from_blocks
placement=slice(0, len(axes[0])))]
File "/usr/local/lib/python3.5/dist-packages/pandas/core/internals.py", line 2719, in make_block
return klass(values, ndim=ndim, fastpath=fastpath, placement=placement)
File "/usr/local/lib/python3.5/dist-packages/pandas/core/internals.py", line 115, in init
len(self.mgr_locs)))
ValueError: Wrong number of items passed 54, placement implies 3

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "Components/AutoFolio-master/scripts/autofolio", line 19, in
af.run_cli()
File "/home/lightning/luo/projects/Sparkle/Sparkle_source_codes/Components/AutoFolio-master/autofolio/autofolio.py", line 89, in run_cli
model_fn=args_.load, feature_vec=list(map(float, args_.feature_vec)))
File "/home/lightning/luo/projects/Sparkle/Sparkle_source_codes/Components/AutoFolio-master/autofolio/autofolio.py", line 293, in read_model_and_predict
feature_vec, index=["pseudo_instance"], columns=scenario.feature_names)
File "/usr/local/lib/python3.5/dist-packages/pandas/core/frame.py", line 306, in init
copy=copy)
File "/usr/local/lib/python3.5/dist-packages/pandas/core/frame.py", line 483, in _init_ndarray
return create_block_manager_from_blocks([values], [columns, index])
File "/usr/local/lib/python3.5/dist-packages/pandas/core/internals.py", line 4303, in create_block_manager_from_blocks
construction_error(tot_items, blocks[0].shape[1:], axes, e)
File "/usr/local/lib/python3.5/dist-packages/pandas/core/internals.py", line 4280, in construction_error
passed, implied))
ValueError: Shape of passed values is (54, 1), indices imply (3, 1)

It seems that AutoFolio recognizes the number of feature size is 3, and the program terminates. However, if I do not use the option '--tune', the program will outputs a schedule list with algorithm and budget.

Could you help me to solve this issue?
Please find my csv files in the attachment.

Thanks very much for your help in advance!

csv_files.zip

Encounter TypeError when running

When try running the toyexample, I had encountered the TypeError for train_scenario

image

If I were to run the toyexample with the -t parameter, encounter another TypeError : sequence item 0: expected str instance, bool found

image

Could the reason because I am running on python 3.6.5?

RuntimeWarning: invalid value encountered in double_scalars

Hi Marius,

I had encountered a problem with calculating the Normalized Score.

AutoFolio-master/autofolio/validation/validate.py:86: RuntimeWarning: invalid value encountered in double_scalars
self.logger.info("Normalized Score: %.4f" %( ( par10 - oracle) / (sbs - oracle)))
INFO:Stats:Normalized Score: nan

Initially I thought that my input data contains negative values or extremely small values causing the error. However, I noticed that the same issue also occurs when running the toy_example data.

Make number of CV folds configurable

Hi Marius,

when using the CSV-facade, one can specify the CV-folds with an extra CSV file:

self.scenario.read_from_csv(perf_fn=perf_fn,

However, when not doing that, it will call the ASLibScenario without specifying the number of CV folds:
https://github.com/mlindauer/ASlibScenario/blob/9ce38dd43dc6e2834cb8ef44cd837514e950a9c5/aslib_scenario/aslib_scenario.py#L168
In that case, the default of 10 folds will be used:
https://github.com/mlindauer/ASlibScenario/blob/9ce38dd43dc6e2834cb8ef44cd837514e950a9c5/aslib_scenario/aslib_scenario.py#L827

It would be convenient, if one could, instead of having to create a full CVS specifying the splits, just pass a custom number of CV folds to use AutoFolio more easily with different dataset sizes.

Let me know if you'd like me to provide a pull request.

Best,
Jan

Encounter TypeError when run AutoFolio with option '--config'

Hi Marius โ€‹,
I encountered TypeError when run AutoFolio with option '--config',
image
The contents of the yaml file are as follows:
image
And I have a question about presolver, can I specify a solver as the presolver? could you please give me more details about presolver?
Thank you very much!

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.