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

TABPFN - Errors when adding it to custom dictionary #1310

Open
apavlo89 opened this issue Jul 22, 2023 · 0 comments
Open

TABPFN - Errors when adding it to custom dictionary #1310

apavlo89 opened this issue Jul 22, 2023 · 0 comments

Comments

@apavlo89
Copy link

apavlo89 commented Jul 22, 2023

I want to add TABPFN to custom tpot dictionary and I do this like so:


    'tabpfn.TabPFNClassifier':{
     'device':['cpu'],
     'N_ensemble_configurations': list(range(2, 39))
    },

When I run it I get following error:

--------------------------------------
IndexError                                Traceback (most recent call last)
[/usr/local/lib/python3.10/dist-packages/tpot/base.py](https://localhost:8080/#) in fit(self, features, target, sample_weight, groups)
    816                 warnings.simplefilter("ignore")
--> 817                 self._pop, _ = eaMuPlusLambda(
    818                     population=self._pop,

7 frames
[/usr/local/lib/python3.10/dist-packages/tpot/gp_deap.py](https://localhost:8080/#) in eaMuPlusLambda(population, toolbox, mu, lambda_, cxpb, mutpb, ngen, pbar, stats, halloffame, verbose, per_generation_function, log_file)
    254         # Select the next generation population
--> 255         population[:] = toolbox.select(population + offspring, mu)
    256 

[/usr/local/lib/python3.10/dist-packages/deap/tools/emo.py](https://localhost:8080/#) in selNSGA2(individuals, k, nd)
     41     for front in pareto_fronts:
---> 42         assignCrowdingDist(front)
     43 

[/usr/local/lib/python3.10/dist-packages/deap/tools/emo.py](https://localhost:8080/#) in assignCrowdingDist(individuals)
    133     for i in range(nobj):
--> 134         crowd.sort(key=lambda element: element[0][i])
    135         distances[crowd[0][1]] = float("inf")

[/usr/local/lib/python3.10/dist-packages/deap/tools/emo.py](https://localhost:8080/#) in <lambda>(element)
    133     for i in range(nobj):
--> 134         crowd.sort(key=lambda element: element[0][i])
    135         distances[crowd[0][1]] = float("inf")

IndexError: tuple index out of range

During handling of the above exception, another exception occurred:

RuntimeError                              Traceback (most recent call last)
[<ipython-input-8-3ca2e567ea91>](https://localhost:8080/#) in <cell line: 139>()
    137 # # train dataset to predict test set
    138 tpot = TPOTClassifier(generations=500, population_size=100, verbosity=2, random_state=42, early_stop = 50, cv = skf, scoring ='balanced_accuracy', n_jobs= -1, config_dict=custom_config_dict, periodic_checkpoint_folder ='/content/drive/MyDrive/Colab Notebooks/TPOT pipelines2/')
--> 139 tpot.fit(X_train, y_train)
    140 print(tpot.score(X_test, y_test))
    141 

[/usr/local/lib/python3.10/dist-packages/tpot/base.py](https://localhost:8080/#) in fit(self, features, target, sample_weight, groups)
    862                     # raise the exception if it's our last attempt
    863                     if attempt == (attempts - 1):
--> 864                         raise e
    865             return self
    866 

[/usr/local/lib/python3.10/dist-packages/tpot/base.py](https://localhost:8080/#) in fit(self, features, target, sample_weight, groups)
    853                         self._pbar.close()
    854 
--> 855                     self._update_top_pipeline()
    856                     self._summary_of_best_pipeline(features, target)
    857                     # Delete the temporary cache before exiting

[/usr/local/lib/python3.10/dist-packages/tpot/base.py](https://localhost:8080/#) in _update_top_pipeline(self)
    933                         )
    934                         break
--> 935                 raise RuntimeError(
    936                     "There was an error in the TPOT optimization "
    937                     "process. This could be because the data was "

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. If you enabled PyTorch estimators, please check the data requirements in the online documentation:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant