Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug when passing config_dict to TPOTAdapter #274

Open
janosh opened this issue Nov 25, 2019 · 2 comments
Open

Bug when passing config_dict to TPOTAdapter #274

janosh opened this issue Nov 25, 2019 · 2 comments
Labels
bug bug patch for stuff that can't wait until the next minor or major version

Comments

@janosh
Copy link
Member

janosh commented Nov 25, 2019

This minimal example demonstrates that passing a config_dict to TPOTAdaptor as shown in the docstring fails.

import automatminer as amm
import pandas as pd

df = pd.DataFrame(pd.np.random.randint(0, 10, (10, 4)), columns=list("abcd"))

tpot_config = {
    "sklearn.ensemble.RandomForestRegressor": {
        "n_estimators": [100],
        "max_features": pd.np.arange(0.05, 1.01, 0.05),
        "min_samples_split": range(2, 21),
        "min_samples_leaf": range(1, 21),
        "bootstrap": [True, False],
    }
}

pipe_config = lambda: {
    **amm.get_preset_config(),
    "learner": amm.TPOTAdaptor(max_time_mins=1, config_dict=tpot_config),
}

mat_pipe = amm.MatPipe(**pipe_config())
mat_pipe.fit(df, "a")

The error I get is

RuntimeError: There was an error in the TPOT optimization process.
This could be because the data was not formatted properly, or because
data for a regression problem was provided to the TPOTClassifier object.
Please make sure you passed the data to TPOT correctly.
@ardunn
Copy link
Contributor

ardunn commented Nov 25, 2019

Hey @janosh thanks for reporting! Yeah that is definitely not the intended behavior. Let me look into it and Ill report back in this thread.

@ardunn ardunn added bug bug v1.1 Issues and enhancements for upcoming minor release v1.1 patch for stuff that can't wait until the next minor or major version and removed v1.1 Issues and enhancements for upcoming minor release v1.1 labels Nov 25, 2019
@janosh
Copy link
Member Author

janosh commented Nov 26, 2019

Different topic but not sure this warrants a new issue. The docs state:

If you want to ensure your features are used for learning, see the section on customizing pipelines.

But then the Customizing pipelines section doesn't go on to show how to do this. Am I missing something?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bug patch for stuff that can't wait until the next minor or major version
Projects
None yet
Development

No branches or pull requests

2 participants