Files
foxhunt/foxhunt-deploy/src/error.rs
jgrusewski 3853988af7 feat(hyperopt): Complete DQN hyperopt analysis and PSO optimizer fix
- Fixed PSO budget calculation bug in ml/src/hyperopt/optimizer.rs
  - Root cause: Division by n_particles in sequential execution
  - Now correctly calculates max_iters = remaining_trials (no division)
  - Result: 50 trials complete instead of 23 (100% vs 46%)

- Added comprehensive DQN hyperopt results analysis
  - 39/50 trials analyzed across 2 RunPod deployments
  - Best hyperparameters identified: LR 4.89e-5 (ultra-low)
  - Created DQN_HYPEROPT_RESULTS_SUMMARY.md with expert validation

- GitLab CI/CD pipeline operational (48 lines fixed)
  - Fixed YAML syntax errors (unquoted colons)
  - All 7 jobs validated and working

- Warning cleanup complete (136 → 0 warnings)
  - Removed 143 lines dead code
  - Fixed visibility, unused imports, Debug traits

- Archived Wave D reports to docs/archive/
  - 8 early stopping reports moved
  - Root directory cleaned up

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-02 21:49:07 +01:00

46 lines
1.2 KiB
Rust

use std::path::PathBuf;
use thiserror::Error;
/// Custom Result type for foxhunt-deploy
pub(crate) type Result<T> = std::result::Result<T, FoxhuntError>;
/// Unified error type for all operations
#[derive(Error, Debug)]
pub(crate) enum FoxhuntError {
#[error("Configuration error: {0}")]
Config(String),
#[error("Config file not found at {path:?}. Run 'foxhunt-deploy init' to create one.")]
ConfigNotFound { path: PathBuf },
#[error("Missing required config field: {field}")]
MissingConfigField { field: String },
#[error("Docker command failed: {0}")]
Docker(String),
#[error("RunPod API error: {status} - {message}")]
RunPodApi { status: u16, message: String },
#[error("S3 error: {0}")]
S3(String),
#[error("IO error: {0}")]
Io(#[from] std::io::Error),
#[error("HTTP request failed: {0}")]
Http(#[from] reqwest::Error),
#[error("Serialization error: {0}")]
Serde(#[from] serde_json::Error),
#[error("TOML parsing error: {0}")]
Toml(#[from] toml::de::Error),
#[error("Invalid argument: {0}")]
InvalidArgument(String),
#[error("Unknown error: {0}")]
Unknown(String),
}