Comments (3)
@himkt That's great! This is exactly what I was looking for. I will try this out :)
from allennlp-optuna.
@JohnGiorgi Let me close this issue. Please feel free to reopen if you need! 👋
from allennlp-optuna.
Thank you @JohnGiorgi for raising the interesting issue.
You would like to set a fixed parameter set like the following?:
import optuna
def objective(trial):
x = trial.suggest_float("x", 0, 10)
return x ** 2
study = optuna.create_study()
study.enqueue_trial({"x": 5}) # set a parameter x=5 for the first trial
study.enqueue_trial({"x": 0}) # then set x=0 for the next trial
study.optimize(objective, n_trials=2)
assert study.trials[0].params == {"x": 5} # x=5 in the first trial
assert study.trials[1].params == {"x": 0} # x=0 in the second trial
If my understanding is correct, the answer is (partially) yes. allennlp-optuna
doesn't provide a way to set predefined parameter combinations but we can load an existing study by --skip-if-exists
option. So I think we can realize that by the following two steps:
1. create study and set manual hyperparameters in Python
> python
>> import optuna
>> study = optuna.craete_study(storage="sqlite:///sample.db", study_name="some_name")
>> study.enqueue_trial({"x1": your_awesome_parameter, "x2": your_awesome_parameter})
>> exit()
2. use the study in allennlp-optuna
allennlp tune ... --study some_name --storage sqlite:///sample.db --skip-if-exists
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
- Trials with repeated set of hyperparameters 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
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.