Comments (4)
@himkt don't you think this is a bug? I don't understand why the optuna team didn't handle this as a bug. It doesn't make sense to run the same trial more than one time. In my scenarios here, I'm getting quite a waste of computational efforts...for one study I got the same set of parameters 45 times out of 137, and for the other I got 33 out of 95.
How do you feel about adding the suggestion from stackoverflow to allennlp-optuna? And enabling it according to a parameter. I like the raise optuna.structs.TrialPruned('Duplicate parameter set')
suggestion better, how about you?
I can help with a PR, if you agree.
from allennlp-optuna.
A sampler could return the same parameter over trials. As a workaround, you can skip a trial and use a past trial for the reporting value.
https://stackoverflow.com/questions/58820574/how-to-sample-parameters-without-duplicates-in-optuna
optuna/optuna#717
from allennlp-optuna.
Yes, I think it is not a bug. An objective function has a noise in nature, and an algorithm could sample a point near the specific point to get more information around it. However, I understand your situation that too many trials searched the same point is not desirable.
TPE places significance on exploitation under the trade-off between exploitation and exploration. And TPE behaves like a majority voting on a histogram for a categorical variable (@HideakiImamura, Optuna core team member told me). He also told me that the optimization could be improved by converting your categorical variable into a discrete variable and using TPE with multivariate=True
(For example, lr
could be a discrete variable of floating points on [1e-5, 5e-5] with step 1. weight_decay is a little bit difficult but it could be a variable on floating points on [0.0, 0.3] in the log domain...).
How do you feel about adding the suggestion from stackoverflow to allennlp-optuna?
I don't think it's good to introduce a duplicate parameter set logic to allennlp-optuna
since this library is a thin wrapper of Optuna. If we introduce the trick, implementing it in Optuna would be better.
@HideakiImamura Please correct me if I wrote something wrong or could be modified. And do you think if we can support skipping evaluation of an objective function for a duplicated parameter set in Optuna?
from allennlp-optuna.
Closed because it is not bug but Optuna specification.
from allennlp-optuna.
Related Issues (17)
- include package is not being passed during distributed training HOT 10
- PruningCallback doesn't work HOT 6
- Erroneous poetry run commands?
- Clarify License HOT 2
- AllenNLP v2
- jsonnet_evaluate_file HOT 13
- retrain runtime error: fail to load study HOT 2
- Question: hyperparameter tuner for allennlp with cross-validation HOT 12
- KeyError: 'attributes' for optuna-param-path config file HOT 11
- Using SuccessiveHalvingPruner HOT 11
- retrain command not getting environment values HOT 4
- Different results from `allennlp tune` and `allennlp retrain` with transformers HOT 4
- Support multi-objective optimization
- Passing overrides to tune command? HOT 1
- Trial X failed because of the following error: ValueError('nan loss encountered') HOT 3
- Provide default/good hyperparameters to start search HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from allennlp-optuna.