Skip to content
New issue

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

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

Already on GitHub? # to your account

Wrong index during CV #1294

Open
uzhao opened this issue Apr 1, 2024 · 1 comment
Open

Wrong index during CV #1294

uzhao opened this issue Apr 1, 2024 · 1 comment

Comments

@uzhao
Copy link

uzhao commented Apr 1, 2024

I got this error after a few rounds. Previous rounds works ok.

[flaml.automl.logger: 04-01 15:17:50] {2392} INFO -  at 5349.0s,        estimator lgbm's best error=0.6645,     best estimator lgbm's best error=0.6645
[flaml.automl.logger: 04-01 15:17:50] {2219} INFO - iteration 17, current learner lgbm
Traceback (most recent call last):
  File "/home/papillon/eden/projects/test.py", line 275, in <module>
    models.fit()
  File "/home/papillon/eden/packages/ib2_base_rf/model.py", line 188, in fit
    model.fit(raw_ys=raw_ys, x_list=x_list)
  File "/home/papillon/eden/packages/ib2_base_rf/model.py", line 116, in fit
    self.model.fit(xs, ys, **self.params["fit"])
  File "/home/papillon/miniforge3/envs/eden/lib/python3.10/site-packages/flaml/automl/automl.py", line 1929, in fit
    self._search()
  File "/home/papillon/miniforge3/envs/eden/lib/python3.10/site-packages/flaml/automl/automl.py", line 2483, in _search
    self._search_sequential()
  File "/home/papillon/miniforge3/envs/eden/lib/python3.10/site-packages/flaml/automl/automl.py", line 2319, in _search_sequential
    analysis = tune.run(
  File "/home/papillon/miniforge3/envs/eden/lib/python3.10/site-packages/flaml/tune/tune.py", line 814, in run
    result = evaluation_function(trial_to_run.config)
  File "/home/papillon/miniforge3/envs/eden/lib/python3.10/site-packages/flaml/automl/state.py", line 304, in _compute_with_config_base
    ) = compute_estimator(
  File "/home/papillon/miniforge3/envs/eden/lib/python3.10/site-packages/flaml/automl/ml.py", line 369, in compute_estimator
    val_loss, metric_for_logging, train_time, pred_time = task.evaluate_model_CV(
  File "/home/papillon/miniforge3/envs/eden/lib/python3.10/site-packages/flaml/automl/task/generic_task.py", line 723, in evaluate_model_CV
    X_train, X_val = X_train_split[train_index], X_train_split[val_index]
IndexError: index 1152921504610266636 is out of bounds for axis 0 with size 5236644

The setting is

            "time_budget": 60 * 60 * 8,
            "metric": "accuracy",
            "task": "classification",
            "estimator_list": ["lgbm"],
            "eval_method": "cv",
            "ensemble": True,

FLAML version is 2.1.2
Lightgbm version is 4.3.0

@Programmer-RD-AI
Copy link
Contributor

can you provide the code you used?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants