Files
Atomizer/studies/UAV_Arm/uav_arm_optimization/reset_study.py

17 lines
544 B
Python
Raw Normal View History

"""Reset drone gimbal arm optimization study by deleting database."""
import optuna
from pathlib import Path
study_dir = Path(__file__).parent
storage = f"sqlite:///{study_dir / '2_results' / 'study.db'}"
study_name = "drone_gimbal_arm_optimization"
try:
# Delete the study
optuna.delete_study(study_name=study_name, storage=storage)
print(f"[OK] Deleted study: {study_name}")
except KeyError:
print(f"[WARNING] Study '{study_name}' not found (database may not exist)")
except Exception as e:
print(f"[ERROR] Error: {e}")