I figured out the metrics should be provided in list format.
Answered
Hi, I'M Trying To Optimize Hyperparameters For Yolov5 Model, But I'M Getting This Error. Could Anyone Help Me Resolve This Issue?
Hi, I'm trying to optimize hyperparameters for yolov5 model, but I'm getting this error. Could anyone help me resolve this issue?
[W 2024-07-10 10:11:52,691] Trial 0 failed with parameters: {} because of the following error:
TypeError("'NoneType' object is not subscriptable").
Traceback (most recent call last):
File "C:\Users\\Desktop\yolov5\venv\lib\site-packages\optuna\study\_optimize.py", line 196, in _run_trial
value_or_values = func(trial)
File "C:\Users\\Desktop\yolov5\venv\lib\site-packages\clearml\automation\optuna\optuna.py", line 92, in objective
objective_metric = objective_metric[0]
TypeError: 'NoneType' object is not subscriptable
[W 2024-07-10 10:11:52,694] Trial 0 failed with value None.
Exception in thread Thread-8:
Traceback (most recent call last):
File "C:\Users\\AppData\Local\Programs\Python\Python39\lib\threading.py", line 973, in _bootstrap_inner
self.run()
File "C:\Users\\AppData\Local\Programs\Python\Python39\lib\threading.py", line 910, in run
self._target(*self._args, **self._kwargs)
File "C:\Users\\Desktop\yolov5\venv\lib\site-packages\clearml\automation\optimization.py", line 1923, in _daemon
self.optimizer.start()
File "C:\Users\\Desktop\yolov5\venv\lib\site-packages\clearml\automation\optuna\optuna.py", line 198, in start
self._study.optimize(
File "C:\Users\\Desktop\yolov5\venv\lib\site-packages\optuna\study\study.py", line 451, in optimize
_optimize(
File "C:\Users\\Desktop\yolov5\venv\lib\site-packages\optuna\study\_optimize.py", line 62, in _optimize
_optimize_sequential(
File "C:\Users\\Desktop\yolov5\venv\lib\site-packages\optuna\study\_optimize.py", line 159, in _optimize_sequential
frozen_trial = _run_trial(study, func, catch)
File "C:\Users\\Desktop\yolov5\venv\lib\site-packages\optuna\study\_optimize.py", line 247, in _run_trial
raise func_err
File "C:\Users\\Desktop\yolov5\venv\lib\site-packages\optuna\study\_optimize.py", line 196, in _run_trial
value_or_values = func(trial)
File "C:\Users\\Desktop\yolov5\venv\lib\site-packages\clearml\automation\optuna\optuna.py", line 92, in objective
objective_metric = objective_metric[0]
TypeError: 'NoneType' object is not subscriptable
`Study.stop` is supposed to be invoked inside an objective function or a callback.
We are done, good bye
395 Views
2
Answers
4 months ago
4 months ago
Tags
Similar posts