210 questions
1 vote
1 answer
63 views
How to handle unstable best_iteration in LightGBM when using Optuna for hyperparameter optimization?
I'm using Optuna to optimize LightGBM hyperparameters, and I'm running into an issue with the variability of best_iteration across different random seeds. Current Setup I train multiple models with ...
0 votes
0 answers
43 views
FutureWarning in Optuna during TabM hyperparameter tuning causes notebook failure after trials complete on Kaggle GPU
I’m running Optuna to tune hyperparameters for a TabM regression model (10 trials) on Kaggle (GPU: Tesla P100) to minimize RMSE. The optimization runs fine — all trials complete — but right after ...
0 votes
0 answers
94 views
How to apply the Best Parameters From Optuna To Predictions
I have done a XGBoost model, and used Optuna to get the best parameters. I saved the trained model and the features used. My question is, when I got to load the model and use it when making ...
0 votes
1 answer
58 views
PyTorch + Optuna causes random segmentation fault inside TransformerEncoderLayer (PyTorch 2.6, CUDA 12)
I'm running into a segmentation fault when training a Transformer model with PyTorch 2.6.0 and Optuna on CUDA (12.4). The exact same code used to work fine the issue appeared only after using Optuna. ...
0 votes
0 answers
102 views
Optuna: Selection of parameters during k-fold CV
I am using Optuna for hyperparameter tuning. I get messages as shown below: Trial 15 finished with value: 6.226334123011727 and parameters: {'iterations': 1100, 'learning_rate': 0.04262148853587423, '...
0 votes
0 answers
164 views
optuna, huggingface-transformers: RuntimeError, "Tensor.item() cannot be called on meta tensors" when n_jobs > 1
I'm trying to use optuna to find good hyperparameters for a fine-tuning task I'm doing with some different language models. My actual code is more complex, but here's a MWE: import torch import optuna ...
1 vote
0 answers
66 views
My RandomSampler() is always generating the same parameters
I used TPESampler and set it as follows while optimizing with optuna: sampler=optuna.samplers.TPESampler(multivariate=True, n_startup_trials=10, seed=None). But in the 10 startup_trials process, it ...
0 votes
0 answers
52 views
Distributed Tensorflow with mulitple GPUS training MNIST with Optuna is stuck when training
I created a 5 GPU Cluster using three nodes/machines locally using the tensorflow.distributed.MultiWorkerMirrored Strategy. One machine has the Apple M1 Pro Metals GPU, the other two nodes has NVIDIA ...
0 votes
0 answers
29 views
Why are Optuna trials running sequentially to completion instead of interleaved with pruning?
My impression is that every trial is run for one step. Then some trials are pruned and the remaining continue for another step and so on. However, the logs show: Trial 0 completed Trial 1 completed ...
0 votes
0 answers
108 views
Slow compilation / Deadlocks when combining joblib and jax
I have some code to train a RL agent in jax. The code runs fine. To tune the hyperparameters I would like to use the optuna plugin of hydra since my project is based on the latter. To this end, I ...
0 votes
0 answers
45 views
Copy Optuna study while slightly altering trial scores
I am using Optuna to optimize the parameters of a non-ML task. Now, each trial consists in processing several files in sequence, each of which gets a score. The scores are summed cumulatively in order ...
0 votes
0 answers
56 views
Is there an equivalent of Optuna get_param_importances in Flaml?
I'm trying to use FLAML for hyperparameter tuning of my model, and I would like to see how each hyperparameter contributes to the objective value. Similar to Optuna's get_param_importances or ...
0 votes
0 answers
51 views
trouble with jobs in Optuna with Darts
I'm trying to set up Optuna for hyperparam optimization. I have 2 main doubt/troubles I don't know if are correlated. When lunching the script with 20 or 100 trials no matter, its run but in some ...
0 votes
0 answers
118 views
Cannot reproduce the result of best trial by optima through best params
This problem has been bothering me for a long time. I am using optuna for automatic parameter tuning of deep learning models, and the objective function returns the average AUC of five folds. Unable ...
0 votes
0 answers
25 views
Default to BaseSampler for load_study
This comment is from this issue: https://github.com/optuna/optuna/issues/5397 I found out what the issue was, If you load a study using "optuna.study.load_study" the settings for the study ...