Comments (11)
Hi @himkt !
Sorry for taking so long, but I was waiting for my last tune to finish...it was running for some days.
I just tried running it again without specifying any parameters, and now the error is this:
Traceback (most recent call last):
File "/opt/conda/envs/allennlp/bin/allennlp", line 8, in <module>
sys.exit(run())
File "/opt/conda/envs/allennlp/lib/python3.8/site-packages/allennlp/__main__.py", line 34, in run
main(prog="allennlp")
File "/opt/conda/envs/allennlp/lib/python3.8/site-packages/allennlp/commands/__init__.py", line 119, in main
args.func(args)
File "/opt/conda/envs/allennlp/lib/python3.8/site-packages/allennlp_datalawyer/tune/tune_cv.py", line 158, in tune_cv
study.optimize(objective_cv, n_trials=n_trials, timeout=timeout)
File "/opt/conda/envs/allennlp/lib/python3.8/site-packages/optuna/study.py", line 400, in optimize
_optimize(
File "/opt/conda/envs/allennlp/lib/python3.8/site-packages/optuna/_optimize.py", line 66, in _optimize
_optimize_sequential(
File "/opt/conda/envs/allennlp/lib/python3.8/site-packages/optuna/_optimize.py", line 163, in _optimize_sequential
trial = _run_trial(study, func, catch)
File "/opt/conda/envs/allennlp/lib/python3.8/site-packages/optuna/_optimize.py", line 268, in _run_trial
raise func_err
File "/opt/conda/envs/allennlp/lib/python3.8/site-packages/optuna/_optimize.py", line 217, in _run_trial
value_or_values = func(trial)
File "/opt/conda/envs/allennlp/lib/python3.8/site-packages/allennlp_datalawyer/tune/tune_cv.py", line 117, in _objective_cv
train_loop = TrainModel.from_params(
File "/opt/conda/envs/allennlp/lib/python3.8/site-packages/allennlp/common/from_params.py", line 589, in from_params
return retyped_subclass.from_params(
File "/opt/conda/envs/allennlp/lib/python3.8/site-packages/allennlp/common/from_params.py", line 623, in from_params
return constructor_to_call(**kwargs) # type: ignore
File "/opt/conda/envs/allennlp/lib/python3.8/site-packages/allennlp/commands/train.py", line 729, in from_partial_objects
trainer_ = trainer.construct(
File "/opt/conda/envs/allennlp/lib/python3.8/site-packages/allennlp/common/lazy.py", line 80, in construct
return self.constructor(**contructor_kwargs)
File "/opt/conda/envs/allennlp/lib/python3.8/site-packages/allennlp/common/lazy.py", line 64, in constructor_to_use
return self._constructor.from_params( # type: ignore[union-attr]
File "/opt/conda/envs/allennlp/lib/python3.8/site-packages/allennlp/common/from_params.py", line 589, in from_params
return retyped_subclass.from_params(
File "/opt/conda/envs/allennlp/lib/python3.8/site-packages/allennlp/common/from_params.py", line 623, in from_params
return constructor_to_call(**kwargs) # type: ignore
File "/opt/conda/envs/allennlp/lib/python3.8/site-packages/allennlp/training/trainer.py", line 1068, in from_partial_objects
callbacks_.append(callback_.construct(serialization_dir=serialization_dir))
File "/opt/conda/envs/allennlp/lib/python3.8/site-packages/allennlp/common/lazy.py", line 80, in construct
return self.constructor(**contructor_kwargs)
File "/opt/conda/envs/allennlp/lib/python3.8/site-packages/allennlp/common/lazy.py", line 64, in constructor_to_use
return self._constructor.from_params( # type: ignore[union-attr]
File "/opt/conda/envs/allennlp/lib/python3.8/site-packages/allennlp/common/from_params.py", line 589, in from_params
return retyped_subclass.from_params(
File "/opt/conda/envs/allennlp/lib/python3.8/site-packages/allennlp/common/from_params.py", line 623, in from_params
return constructor_to_call(**kwargs) # type: ignore
File "/opt/conda/envs/allennlp/lib/python3.8/site-packages/optuna/_experimental.py", line 90, in wrapped_init
_original_init(self, *args, **kwargs)
File "/opt/conda/envs/allennlp/lib/python3.8/site-packages/optuna/integration/allennlp.py", line 464, in __init__
study = load_study(study_name, storage, pruner=_create_pruner())
File "/opt/conda/envs/allennlp/lib/python3.8/site-packages/optuna/integration/allennlp.py", line 95, in _create_pruner
return pruner(**pruner_params)
File "/opt/conda/envs/allennlp/lib/python3.8/site-packages/optuna/pruners/_successive_halving.py", line 121, in __init__
raise ValueError(
ValueError: The value of `min_resource` is None, but must be either `min_resource` >= 1 or 'auto'
from allennlp-optuna.
Sure @himkt , fine by me.
from allennlp-optuna.
Hello @pvcastro! Thank you so much for trying allennlp-optuna
.
As you pointed out, allennlp-optuna
currently doesn't allow users to specify samplers/pruners without attributes
.
After #40 being merged, you can use a sampler or pruner with the configuration you shared.
from allennlp-optuna.
#40 was merged. You can skip specifying attributes
from the next release of allennlp-optuna.
from allennlp-optuna.
Great, thanks @himkt !
As soon as my current search finishes, I'll try this new version.
from allennlp-optuna.
I released allennlp-optuna v0.1.6 just now. It fixes the problem!
https://github.com/himkt/allennlp-optuna/releases/tag/v0.1.6
from allennlp-optuna.
Hmm, sorry for the inconvenience.
Can you share your config file you used? (optuna param file (json) and allennlp config file (jsonnet))
from allennlp-optuna.
from allennlp-optuna.
Hi @himkt !
optuna.json was just:
{
"pruner": {
"type": "SuccessiveHalvingPruner"
}
}
the callback config from jsonnet was:
callbacks: [
{
type: 'optuna_pruner'
}
],
Do you think you need the whole config file? I'm thinking these should be enough, right?
from allennlp-optuna.
Thank you for sharing the configurations. I identified the cause, and I'm working on fixing it.
Can we close this issue and move to #39 for further discussion?
from allennlp-optuna.
Thank you! Let me close it.
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
- 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
- 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.