-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
__init__() missing 1 required positional argument: 'temperature' #32
Comments
Hi, do you solve this problem? |
Hi, D |
Hi, I'm having this issue too but can't find pytorch 1.8.2, do you have any more details about how to solve the problem? They would be much appreciated! |
Hi, However, I updated to 1.9 and it still works, thus I believe you should create a fresh python virtual environment with pytorch 1.9 and albumentations only, avoiding any conflict with other packages |
Did this solution help you? I tried a different version of torch, but it doesn't work. Log is the same. |
@kompaso eventually I did get it working, I think partly due to the above. I created a 3.9.7 venv with the following package versions, although my understanding is that your torchvision/cuda might need to be different depending on hardware: absl-py==0.11.0 Good luck! |
@adam-j-kelly thanks a lot! In my case problem was in hydra-core |
This is what I had to do to get the cifar10 example to work:
|
The solution by @ihamdi worked for me! Thanks a lot! I needed to add a slight modification by doing pip install torch==1.8.0+cu111 -f https://download.pytorch.org/whl/torch_stable.html to have a compatible CUDA runtime version. In case it helps anybody: absl-py==1.0.0 |
Yeah please make sure you have the correct cudatoolkit according to your hardware. Unfortunately the output in the json files isn't giving a rotation range but rather the same negative number as upper and lower limit. When I try to use the file to implement the generated augmentations, the code blows up because it is impossible to generate a random number between two numbers that are identical. I'm stumped and don't know how to proceed from there. I don't want to mess with the random just to make this work. |
Hi, I solved this problem on my machine by downgrading the hydra core version to |
I cloned the repository and run:
autoalbument-search --config-dir autoalbument/examples/cifar10/
But I got the following error (the same with imagenet and svhn)
Error executing job with overrides: []
Traceback (most recent call last):
File "/users/dcar/anaconda3/envs/pytorch/lib/python3.8/site-packages/hydra/_internal/instantiate/_instantiate2.py", line 62, in _call_target
return target(*args, **kwargs)
TypeError: init() missing 1 required positional argument: 'temperature'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/users/dcar/anaconda3/envs/pytorch/bin/autoalbument-search", line 8, in
sys.exit(main())
File "/users/dcar/anaconda3/envs/pytorch/lib/python3.8/site-packages/hydra/main.py", line 48, in decorated_main
_run_hydra(
File "/users/dcar/anaconda3/envs/pytorch/lib/python3.8/site-packages/hydra/_internal/utils.py", line 377, in _run_hydra
run_and_report(
File "/users/dcar/anaconda3/envs/pytorch/lib/python3.8/site-packages/hydra/_internal/utils.py", line 214, in run_and_report
raise ex
File "/users/dcar/anaconda3/envs/pytorch/lib/python3.8/site-packages/hydra/_internal/utils.py", line 211, in run_and_report
return func()
File "/users/dcar/anaconda3/envs/pytorch/lib/python3.8/site-packages/hydra/_internal/utils.py", line 378, in
lambda: hydra.run(
File "/users/dcar/anaconda3/envs/pytorch/lib/python3.8/site-packages/hydra/_internal/hydra.py", line 111, in run
_ = ret.return_value
File "/users/dcar/anaconda3/envs/pytorch/lib/python3.8/site-packages/hydra/core/utils.py", line 233, in return_value
raise self._return_value
File "/users/dcar/anaconda3/envs/pytorch/lib/python3.8/site-packages/hydra/core/utils.py", line 160, in run_job
ret.return_value = task_function(task_cfg)
File "/users/dcar/anaconda3/envs/pytorch/lib/python3.8/site-packages/autoalbument/cli/search.py", line 54, in main
searcher = instantiate(cfg.searcher, cfg=cfg)
File "/users/dcar/anaconda3/envs/pytorch/lib/python3.8/site-packages/hydra/_internal/instantiate/_instantiate2.py", line 180, in instantiate
return instantiate_node(config, *args, recursive=recursive, convert=convert)
File "/users/dcar/anaconda3/envs/pytorch/lib/python3.8/site-packages/hydra/_internal/instantiate/_instantiate2.py", line 245, in instantiate_node
value = instantiate_node(
File "/users/dcar/anaconda3/envs/pytorch/lib/python3.8/site-packages/hydra/_internal/instantiate/_instantiate2.py", line 266, in instantiate_node
cfg[key] = instantiate_node(
File "/users/dcar/anaconda3/envs/pytorch/lib/python3.8/site-packages/hydra/_internal/instantiate/_instantiate2.py", line 266, in instantiate_node
cfg[key] = instantiate_node(
File "/users/dcar/anaconda3/envs/pytorch/lib/python3.8/site-packages/hydra/_internal/instantiate/_instantiate2.py", line 223, in instantiate_node
items = [
File "/users/dcar/anaconda3/envs/pytorch/lib/python3.8/site-packages/hydra/_internal/instantiate/_instantiate2.py", line 224, in
instantiate_node(item, convert=convert, recursive=recursive)
File "/users/dcar/anaconda3/envs/pytorch/lib/python3.8/site-packages/hydra/_internal/instantiate/_instantiate2.py", line 249, in instantiate_node
return _call_target(target, *args, **kwargs)
File "/users/dcar/anaconda3/envs/pytorch/lib/python3.8/site-packages/hydra/_internal/instantiate/_instantiate2.py", line 64, in _call_target
raise type(e)(
File "/users/dcar/anaconda3/envs/pytorch/lib/python3.8/site-packages/hydra/_internal/instantiate/_instantiate2.py", line 62, in _call_target
return target(*args, **kwargs)
TypeError: Error instantiating 'autoalbument.faster_autoaugment.models.policy_operations.ShiftRGB' : init() missing 1 required positional argument: 'temperature'
My versions are:
albumentations 1.0.3
autoalbument 0.4.0
Any hint?
Thx
The text was updated successfully, but these errors were encountered: