Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
Signed-off-by: FL03 <jo3mccain@icloud.com>
  • Loading branch information
FL03 committed Jan 24, 2025
1 parent ab06423 commit 961a3f3
Show file tree
Hide file tree
Showing 13 changed files with 54 additions and 457 deletions.
40 changes: 22 additions & 18 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,48 +4,52 @@ updates:
- package-ecosystem: cargo
directory: /
schedule:
interval: weekly
interval: monthly
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
interval: monthly
- package-ecosystem: cargo
directory: /concision
schedule:
interval: weekly
interval: monthly
- package-ecosystem: cargo
directory: /core
schedule:
interval: weekly
interval: monthly
- package-ecosystem: cargo
directory: /data
schedule:
interval: weekly
interval: monthly
- package-ecosystem: cargo
directory: /derive
schedule:
interval: weekly
interval: monthly
- package-ecosystem: cargo
directory: /macros
schedule:
interval: weekly
interval: monthly
- package-ecosystem: cargo
directory: /math
schedule:
interval: monthly
- package-ecosystem: cargo
directory: /models/gnn
schedule:
interval: weekly
interval: monthly
- package-ecosystem: cargo
directory: /models/kan
schedule:
interval: weekly
- directory: /models/linear
package-ecosystem: cargo
interval: monthly
- package-ecosystem: cargo
directory: /models/linear
schedule:
interval: weekly
- directory: /models/s4
package-ecosystem: cargo
interval: monthly
- package-ecosystem: cargo
directory: /models/s4
schedule:
interval: weekly
- directory: /models/transformer
package-ecosystem: cargo
interval: monthly
- package-ecosystem: cargo
directory: /models/transformer
schedule:
interval: weekly
interval: monthly
11 changes: 1 addition & 10 deletions concision/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ repository.workspace = true
version.workspace = true

[features]
default = ["data", "math", "std"]
default = ["data", "std"]
full = [
"approx",
"default",
Expand All @@ -33,8 +33,6 @@ derive = ["dep:concision-derive", "macros"]

macros = ["dep:concision-macros"]

math = ["dep:concision-math"]

# ********* [FF] Models(s) *********
models = []

Expand All @@ -55,7 +53,6 @@ alloc = [
"concision-gnn?/alloc",
"concision-kan?/alloc",
"concision-linear?/alloc",
"concision-math?/alloc",
"concision-s4?/alloc",
"concision-transformer?/alloc",
]
Expand All @@ -66,7 +63,6 @@ approx = [
"concision-gnn?/approx",
"concision-kan?/approx",
"concision-linear?/approx",
"concision-math?/approx",
"concision-s4?/approx",
"concision-transformer?/approx",
]
Expand All @@ -87,7 +83,6 @@ serde = [
"concision-gnn?/serde",
"concision-kan?/serde",
"concision-linear?/serde",
"concision-math?/serde",
"concision-s4?/serde",
"concision-transformer?/serde",
]
Expand All @@ -98,7 +93,6 @@ tracing = [
"concision-gnn?/tracing",
"concision-kan?/tracing",
"concision-linear?/tracing",
"concision-math?/tracing",
"concision-s4?/tracing",
"concision-transformer?/tracing",
]
Expand All @@ -111,7 +105,6 @@ std = [
"concision-gnn?/std",
"concision-kan?/std",
"concision-linear?/std",
"concision-math?/std",
"concision-s4?/std",
"concision-transformer?/std",
]
Expand All @@ -123,7 +116,6 @@ blas = [
"concision-gnn?/blas",
"concision-kan?/blas",
"concision-linear?/blas",
"concision-math?/blas",
"concision-s4?/blas",
"concision-transformer?/blas",
]
Expand Down Expand Up @@ -161,7 +153,6 @@ concision-core = { path = "../core", version = "0.1.16" }
concision-data = { optional = true, path = "../data", version = "0.1.16" }
concision-derive = { optional = true, path = "../derive", version = "0.1.16" }
concision-macros = { optional = true, path = "../macros", version = "0.1.16" }
concision-math = { optional = true, path = "../math", version = "0.1.16" }

# *************** Models ***************
concision-gnn = { optional = true, path = "../models/gnn", version = "0.1.16" }
Expand Down
5 changes: 1 addition & 4 deletions concision/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ pub use concision_kan as kan;
pub use concision_linear as linear;
#[cfg(feature = "macros")]
pub use concision_macros::*;
#[cfg(feature = "math")]
#[doc(inline)]
pub use concision_math as math;
#[cfg(feature = "s4")]
#[doc(inline)]
pub use concision_s4 as s4;
Expand All @@ -38,6 +35,7 @@ pub use concision_s4 as s4;
pub use concision_transformer as transformer;

pub mod prelude {
pub use concision_core::prelude::*;
#[cfg(feature = "gnn")]
pub use crate::gnn::prelude::*;
#[cfg(feature = "kan")]
Expand All @@ -48,7 +46,6 @@ pub mod prelude {
pub use crate::s4::prelude::*;
#[cfg(feature = "transformer")]
pub use crate::transformer::prelude::*;
pub use concision_core::prelude::*;
#[cfg(feature = "data")]
pub use concision_data::prelude::*;
#[cfg(feature = "derive")]
Expand Down
19 changes: 10 additions & 9 deletions core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,30 +14,29 @@ version.workspace = true

[features]
default = ["std"]

full = ["default", "approx", "rand", "serde", "tracing"]

# [FF] Dependencies
# ********* [FF] Dependencies *********
alloc = [
"concision-math/alloc",
"num/alloc",
"rand?/alloc",
"rand_distr?/alloc",
"scsys/alloc",
"serde?/alloc",
]

approx = ["dep:approx", "ndarray/approx"]

blas = ["ndarray/blas"]
approx = ["dep:approx", "ndarray/approx", "concision-math/approx"]

rand = ["dep:rand", "dep:rand_distr", "dep:ndarray-rand", "rand-ext"]
blas = ["ndarray/blas", "concision-math/blas"]

rand-ext = ["num/rand", "uuid/rng", "uuid/v4"]
rand = ["dep:rand", "dep:rand_distr", "dep:ndarray-rand", "num/rand", "uuid/rng", "uuid/v4"]

std-rng = ["rand?/std", "rand?/std_rng"]

serde = [
"dep:serde",
"concision-math/serde",
"ndarray/serde",
"num/serde",
"rand?/serde1",
Expand All @@ -46,11 +45,12 @@ serde = [
"uuid/serde",
]

tracing = ["dep:tracing"]
tracing = ["dep:tracing", "concision-math/tracing"]

# ********* [FF] Environments *********
std = [
"alloc",
"concision-math/std",
"std-rng",
"ndarray/std",
"num/std",
Expand Down Expand Up @@ -85,7 +85,8 @@ name = "nn"
lazy_static.workspace = true

[dependencies]
concision-math = { path = "../math", version = "0.1.16" }
concision-math = { default-features = false, path = "../math", version = "0.1.16" }

ndarray.workspace = true
num.workspace = true
paste.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion core/src/func/activate/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Appellation: utils <module>
Contrib: FL03 <jo3mccain@icloud.com>
*/
use math::Exp;
use concision_math::Exp;
use nd::prelude::{Array, ArrayBase, Axis, Dimension};
use nd::{Data, RemoveAxis, ScalarOperand};
use num::complex::ComplexFloat;
Expand Down
5 changes: 2 additions & 3 deletions core/src/func/loss/reg/avg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
Appellation: avg <module>
Contrib: FL03 <jo3mccain@icloud.com>
*/
use math::{Abs, Squared};
use ndarray::prelude::*;
use ndarray::{Data, ScalarOperand};
use concision_math::{Abs, Squared};
use ndarray::{ArrayBase, Data, Dimension, ScalarOperand};
use num::traits::{FromPrimitive, Num, Pow, Signed};

pub trait MeanAbsoluteError<Rhs = Self> {
Expand Down
5 changes: 2 additions & 3 deletions core/src/func/loss/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
Appellation: utils <loss>
Contrib: FL03 <jo3mccain@icloud.com>
*/
use math::{Abs, Squared};
use nd::prelude::*;
use nd::{Data, ScalarOperand};
use concision_math::{Abs, Squared};
use ndarray::{ArrayBase, Data, Dimension, ScalarOperand};
use num::traits::{FromPrimitive, Num, Pow, Signed};

/// A functional implementation of the mean absolute error loss function which compares two similar
Expand Down
19 changes: 15 additions & 4 deletions core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,31 @@
Appellation: core <library>
Contrib: FL03 <jo3mccain@icloud.com>
*/
//! # concision-core
//!
//! This crate is the core library for the Concision project. It provides the basic building blocks for creating neural networks and other machine learning models.
//! The core modules of the `concision` sdk implement the building blocks for neural networks and other machine learning models.
//!
//! ## Overview
//!
//! `concision` and its constituent modules are designed to be a lightweight, flexible, and efficient machine learning library built around
//! well-documented and tested abstractions. The core modules provide the following:
//!
//! - **Neural Network Layers**: A collection of neural network layers and activation functions.
//! - **Optimization Algorithms**: A collection of optimization algorithms for training neural networks.
//! - **Loss Functions**: A collection of loss functions for training neural networks.
//! - **Initialization Strategies**: A collection of initialization strategies for initializing neural network weights.
#![cfg_attr(not(feature = "std"), no_std)]
#![crate_name = "concision_core"]

#[cfg(feature = "alloc")]
extern crate alloc;

extern crate concision_math as math;
extern crate ndarray as nd;

#[cfg(feature = "rand")]
extern crate ndarray_rand as ndrand;

#[doc(inline)]
pub use concision_math as math;

pub use self::error::{Error, ModelError, Result};
pub use self::func::Activate;
pub use self::nn::Module;
Expand Down
68 changes: 0 additions & 68 deletions core/src/math/arith.rs

This file was deleted.

19 changes: 0 additions & 19 deletions core/src/math/mod.rs

This file was deleted.

Loading

0 comments on commit 961a3f3

Please sign in to comment.