use crate::neural_architecture_search::{types::*, architecture::*, config::*};
use anyhow::Result;
pub trait SearchStrategyImpl {
fn search(&mut self, search_space: &ArchitectureSearchSpace, config: &NASConfig) -> Result<Vec<Architecture>>;
fn update(&mut self, architectures: &[Architecture]) -> Result<()>;
}
pub struct EvolutionaryAlgorithm {
population: Vec<Architecture>,
generation: usize,
}
impl EvolutionaryAlgorithm {
pub fn new() -> Self {
Self {
population: Vec::new(),
generation: 0,
}
}
}
impl SearchStrategyImpl for EvolutionaryAlgorithm {
fn search(&mut self, _search_space: &ArchitectureSearchSpace, _config: &NASConfig) -> Result<Vec<Architecture>> {
Ok(Vec::new())
}
fn update(&mut self, _architectures: &[Architecture]) -> Result<()> {
Ok(())
}
}
pub struct ReinforcementLearning {
controller: Option<String>, }
impl ReinforcementLearning {
pub fn new() -> Self {
Self {
controller: None,
}
}
}
impl SearchStrategyImpl for ReinforcementLearning {
fn search(&mut self, _search_space: &ArchitectureSearchSpace, _config: &NASConfig) -> Result<Vec<Architecture>> {
Ok(Vec::new())
}
fn update(&mut self, _architectures: &[Architecture]) -> Result<()> {
Ok(())
}
}
pub struct BayesianOptimization {
surrogate_model: Option<String>, }
impl BayesianOptimization {
pub fn new() -> Self {
Self {
surrogate_model: None,
}
}
}
impl SearchStrategyImpl for BayesianOptimization {
fn search(&mut self, _search_space: &ArchitectureSearchSpace, _config: &NASConfig) -> Result<Vec<Architecture>> {
Ok(Vec::new())
}
fn update(&mut self, _architectures: &[Architecture]) -> Result<()> {
Ok(())
}
}