refactor: remove visualization and fanova feature flags
Always build visualization and fanova code unconditionally.
This commit is contained in:
@@ -38,8 +38,6 @@ tracing = ["dep:tracing"]
|
||||
sobol = ["dep:sobol_burley"]
|
||||
cma-es = ["dep:nalgebra"]
|
||||
gp = ["dep:nalgebra"]
|
||||
visualization = []
|
||||
fanova = []
|
||||
|
||||
[dev-dependencies]
|
||||
tokio = { version = "1", features = ["rt-multi-thread", "macros", "time"] }
|
||||
@@ -72,7 +70,6 @@ required-features = ["derive"]
|
||||
[[example]]
|
||||
name = "visualization_demo"
|
||||
path = "examples/visualization_demo.rs"
|
||||
required-features = ["visualization"]
|
||||
|
||||
[[test]]
|
||||
name = "journal_tests"
|
||||
|
||||
@@ -222,7 +222,6 @@ macro_rules! trace_debug {
|
||||
|
||||
mod distribution;
|
||||
mod error;
|
||||
#[cfg(feature = "fanova")]
|
||||
mod fanova;
|
||||
mod importance;
|
||||
mod kde;
|
||||
@@ -237,11 +236,9 @@ pub mod storage;
|
||||
mod study;
|
||||
mod trial;
|
||||
mod types;
|
||||
#[cfg(feature = "visualization")]
|
||||
mod visualization;
|
||||
|
||||
pub use error::{Error, Result, TrialPruned};
|
||||
#[cfg(feature = "fanova")]
|
||||
pub use fanova::{FanovaConfig, FanovaResult};
|
||||
pub use multi_objective::{MultiObjectiveSampler, MultiObjectiveStudy, MultiObjectiveTrial};
|
||||
#[cfg(feature = "derive")]
|
||||
@@ -278,7 +275,6 @@ pub use study::Study;
|
||||
pub use study::StudySnapshot;
|
||||
pub use trial::{AttrValue, Trial};
|
||||
pub use types::{Direction, TrialState};
|
||||
#[cfg(feature = "visualization")]
|
||||
pub use visualization::generate_html_report;
|
||||
|
||||
/// Convenient wildcard import for the most common types.
|
||||
@@ -291,7 +287,6 @@ pub mod prelude {
|
||||
pub use optimizer_derive::Categorical as DeriveCategory;
|
||||
|
||||
pub use crate::error::{Error, Result, TrialPruned};
|
||||
#[cfg(feature = "fanova")]
|
||||
pub use crate::fanova::{FanovaConfig, FanovaResult};
|
||||
pub use crate::multi_objective::{MultiObjectiveStudy, MultiObjectiveTrial};
|
||||
pub use crate::param::ParamValue;
|
||||
@@ -326,6 +321,5 @@ pub mod prelude {
|
||||
pub use crate::study::StudySnapshot;
|
||||
pub use crate::trial::{AttrValue, Trial};
|
||||
pub use crate::types::Direction;
|
||||
#[cfg(feature = "visualization")]
|
||||
pub use crate::visualization::generate_html_report;
|
||||
}
|
||||
|
||||
@@ -2081,7 +2081,6 @@ where
|
||||
/// # Errors
|
||||
///
|
||||
/// Returns [`crate::Error::NoCompletedTrials`] if fewer than 2 trials have completed.
|
||||
#[cfg(feature = "fanova")]
|
||||
pub fn fanova(&self) -> crate::Result<crate::fanova::FanovaResult> {
|
||||
self.fanova_with_config(&crate::fanova::FanovaConfig::default())
|
||||
}
|
||||
@@ -2094,7 +2093,6 @@ where
|
||||
/// # Errors
|
||||
///
|
||||
/// Returns [`crate::Error::NoCompletedTrials`] if fewer than 2 trials have completed.
|
||||
#[cfg(feature = "fanova")]
|
||||
#[allow(clippy::cast_precision_loss)]
|
||||
pub fn fanova_with_config(
|
||||
&self,
|
||||
@@ -2357,7 +2355,6 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "visualization")]
|
||||
impl Study<f64> {
|
||||
/// Generates an HTML report with interactive Plotly.js charts.
|
||||
///
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
//! Integration tests for fANOVA parameter importance.
|
||||
|
||||
#![cfg(feature = "fanova")]
|
||||
|
||||
use optimizer::prelude::*;
|
||||
|
||||
#[test]
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#![cfg(feature = "visualization")]
|
||||
|
||||
use optimizer::parameter::{FloatParam, IntParam, Parameter};
|
||||
use optimizer::sampler::random::RandomSampler;
|
||||
use optimizer::{Direction, Study, generate_html_report};
|
||||
|
||||
Reference in New Issue
Block a user