Skip to content

Commit 961a3f3

Browse files
committedJan 24, 2025·
update
Signed-off-by: FL03 <jo3mccain@icloud.com>
1 parent ab06423 commit 961a3f3

File tree

13 files changed

+54
-457
lines changed

13 files changed

+54
-457
lines changed
 

‎.github/dependabot.yml

+22-18
Original file line numberDiff line numberDiff line change
@@ -4,48 +4,52 @@ updates:
44
- package-ecosystem: cargo
55
directory: /
66
schedule:
7-
interval: weekly
7+
interval: monthly
88
- package-ecosystem: github-actions
99
directory: /
1010
schedule:
11-
interval: weekly
11+
interval: monthly
1212
- package-ecosystem: cargo
1313
directory: /concision
1414
schedule:
15-
interval: weekly
15+
interval: monthly
1616
- package-ecosystem: cargo
1717
directory: /core
1818
schedule:
19-
interval: weekly
19+
interval: monthly
2020
- package-ecosystem: cargo
2121
directory: /data
2222
schedule:
23-
interval: weekly
23+
interval: monthly
2424
- package-ecosystem: cargo
2525
directory: /derive
2626
schedule:
27-
interval: weekly
27+
interval: monthly
2828
- package-ecosystem: cargo
2929
directory: /macros
3030
schedule:
31-
interval: weekly
31+
interval: monthly
32+
- package-ecosystem: cargo
33+
directory: /math
34+
schedule:
35+
interval: monthly
3236
- package-ecosystem: cargo
3337
directory: /models/gnn
3438
schedule:
35-
interval: weekly
39+
interval: monthly
3640
- package-ecosystem: cargo
3741
directory: /models/kan
3842
schedule:
39-
interval: weekly
40-
- directory: /models/linear
41-
package-ecosystem: cargo
43+
interval: monthly
44+
- package-ecosystem: cargo
45+
directory: /models/linear
4246
schedule:
43-
interval: weekly
44-
- directory: /models/s4
45-
package-ecosystem: cargo
47+
interval: monthly
48+
- package-ecosystem: cargo
49+
directory: /models/s4
4650
schedule:
47-
interval: weekly
48-
- directory: /models/transformer
49-
package-ecosystem: cargo
51+
interval: monthly
52+
- package-ecosystem: cargo
53+
directory: /models/transformer
5054
schedule:
51-
interval: weekly
55+
interval: monthly

‎concision/Cargo.toml

+1-10
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ repository.workspace = true
1212
version.workspace = true
1313

1414
[features]
15-
default = ["data", "math", "std"]
15+
default = ["data", "std"]
1616
full = [
1717
"approx",
1818
"default",
@@ -33,8 +33,6 @@ derive = ["dep:concision-derive", "macros"]
3333

3434
macros = ["dep:concision-macros"]
3535

36-
math = ["dep:concision-math"]
37-
3836
# ********* [FF] Models(s) *********
3937
models = []
4038

@@ -55,7 +53,6 @@ alloc = [
5553
"concision-gnn?/alloc",
5654
"concision-kan?/alloc",
5755
"concision-linear?/alloc",
58-
"concision-math?/alloc",
5956
"concision-s4?/alloc",
6057
"concision-transformer?/alloc",
6158
]
@@ -66,7 +63,6 @@ approx = [
6663
"concision-gnn?/approx",
6764
"concision-kan?/approx",
6865
"concision-linear?/approx",
69-
"concision-math?/approx",
7066
"concision-s4?/approx",
7167
"concision-transformer?/approx",
7268
]
@@ -87,7 +83,6 @@ serde = [
8783
"concision-gnn?/serde",
8884
"concision-kan?/serde",
8985
"concision-linear?/serde",
90-
"concision-math?/serde",
9186
"concision-s4?/serde",
9287
"concision-transformer?/serde",
9388
]
@@ -98,7 +93,6 @@ tracing = [
9893
"concision-gnn?/tracing",
9994
"concision-kan?/tracing",
10095
"concision-linear?/tracing",
101-
"concision-math?/tracing",
10296
"concision-s4?/tracing",
10397
"concision-transformer?/tracing",
10498
]
@@ -111,7 +105,6 @@ std = [
111105
"concision-gnn?/std",
112106
"concision-kan?/std",
113107
"concision-linear?/std",
114-
"concision-math?/std",
115108
"concision-s4?/std",
116109
"concision-transformer?/std",
117110
]
@@ -123,7 +116,6 @@ blas = [
123116
"concision-gnn?/blas",
124117
"concision-kan?/blas",
125118
"concision-linear?/blas",
126-
"concision-math?/blas",
127119
"concision-s4?/blas",
128120
"concision-transformer?/blas",
129121
]
@@ -161,7 +153,6 @@ concision-core = { path = "../core", version = "0.1.16" }
161153
concision-data = { optional = true, path = "../data", version = "0.1.16" }
162154
concision-derive = { optional = true, path = "../derive", version = "0.1.16" }
163155
concision-macros = { optional = true, path = "../macros", version = "0.1.16" }
164-
concision-math = { optional = true, path = "../math", version = "0.1.16" }
165156

166157
# *************** Models ***************
167158
concision-gnn = { optional = true, path = "../models/gnn", version = "0.1.16" }

‎concision/src/lib.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@ pub use concision_kan as kan;
2727
pub use concision_linear as linear;
2828
#[cfg(feature = "macros")]
2929
pub use concision_macros::*;
30-
#[cfg(feature = "math")]
31-
#[doc(inline)]
32-
pub use concision_math as math;
3330
#[cfg(feature = "s4")]
3431
#[doc(inline)]
3532
pub use concision_s4 as s4;
@@ -38,6 +35,7 @@ pub use concision_s4 as s4;
3835
pub use concision_transformer as transformer;
3936

4037
pub mod prelude {
38+
pub use concision_core::prelude::*;
4139
#[cfg(feature = "gnn")]
4240
pub use crate::gnn::prelude::*;
4341
#[cfg(feature = "kan")]
@@ -48,7 +46,6 @@ pub mod prelude {
4846
pub use crate::s4::prelude::*;
4947
#[cfg(feature = "transformer")]
5048
pub use crate::transformer::prelude::*;
51-
pub use concision_core::prelude::*;
5249
#[cfg(feature = "data")]
5350
pub use concision_data::prelude::*;
5451
#[cfg(feature = "derive")]

‎core/Cargo.toml

+10-9
Original file line numberDiff line numberDiff line change
@@ -14,30 +14,29 @@ version.workspace = true
1414

1515
[features]
1616
default = ["std"]
17-
1817
full = ["default", "approx", "rand", "serde", "tracing"]
1918

20-
# [FF] Dependencies
19+
# ********* [FF] Dependencies *********
2120
alloc = [
21+
"concision-math/alloc",
2222
"num/alloc",
2323
"rand?/alloc",
2424
"rand_distr?/alloc",
2525
"scsys/alloc",
2626
"serde?/alloc",
2727
]
2828

29-
approx = ["dep:approx", "ndarray/approx"]
30-
31-
blas = ["ndarray/blas"]
29+
approx = ["dep:approx", "ndarray/approx", "concision-math/approx"]
3230

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

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

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

3937
serde = [
4038
"dep:serde",
39+
"concision-math/serde",
4140
"ndarray/serde",
4241
"num/serde",
4342
"rand?/serde1",
@@ -46,11 +45,12 @@ serde = [
4645
"uuid/serde",
4746
]
4847

49-
tracing = ["dep:tracing"]
48+
tracing = ["dep:tracing", "concision-math/tracing"]
5049

5150
# ********* [FF] Environments *********
5251
std = [
5352
"alloc",
53+
"concision-math/std",
5454
"std-rng",
5555
"ndarray/std",
5656
"num/std",
@@ -85,7 +85,8 @@ name = "nn"
8585
lazy_static.workspace = true
8686

8787
[dependencies]
88-
concision-math = { path = "../math", version = "0.1.16" }
88+
concision-math = { default-features = false, path = "../math", version = "0.1.16" }
89+
8990
ndarray.workspace = true
9091
num.workspace = true
9192
paste.workspace = true

‎core/src/func/activate/utils.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Appellation: utils <module>
33
Contrib: FL03 <jo3mccain@icloud.com>
44
*/
5-
use math::Exp;
5+
use concision_math::Exp;
66
use nd::prelude::{Array, ArrayBase, Axis, Dimension};
77
use nd::{Data, RemoveAxis, ScalarOperand};
88
use num::complex::ComplexFloat;

‎core/src/func/loss/reg/avg.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22
Appellation: avg <module>
33
Contrib: FL03 <jo3mccain@icloud.com>
44
*/
5-
use math::{Abs, Squared};
6-
use ndarray::prelude::*;
7-
use ndarray::{Data, ScalarOperand};
5+
use concision_math::{Abs, Squared};
6+
use ndarray::{ArrayBase, Data, Dimension, ScalarOperand};
87
use num::traits::{FromPrimitive, Num, Pow, Signed};
98

109
pub trait MeanAbsoluteError<Rhs = Self> {

‎core/src/func/loss/utils.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22
Appellation: utils <loss>
33
Contrib: FL03 <jo3mccain@icloud.com>
44
*/
5-
use math::{Abs, Squared};
6-
use nd::prelude::*;
7-
use nd::{Data, ScalarOperand};
5+
use concision_math::{Abs, Squared};
6+
use ndarray::{ArrayBase, Data, Dimension, ScalarOperand};
87
use num::traits::{FromPrimitive, Num, Pow, Signed};
98

109
/// A functional implementation of the mean absolute error loss function which compares two similar

‎core/src/lib.rs

+15-4
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,31 @@
22
Appellation: core <library>
33
Contrib: FL03 <jo3mccain@icloud.com>
44
*/
5-
//! # concision-core
6-
//!
7-
//! 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.
5+
//! The core modules of the `concision` sdk implement the building blocks for neural networks and other machine learning models.
6+
//!
7+
//! ## Overview
8+
//!
9+
//! `concision` and its constituent modules are designed to be a lightweight, flexible, and efficient machine learning library built around
10+
//! well-documented and tested abstractions. The core modules provide the following:
11+
//!
12+
//! - **Neural Network Layers**: A collection of neural network layers and activation functions.
13+
//! - **Optimization Algorithms**: A collection of optimization algorithms for training neural networks.
14+
//! - **Loss Functions**: A collection of loss functions for training neural networks.
15+
//! - **Initialization Strategies**: A collection of initialization strategies for initializing neural network weights.
816
#![cfg_attr(not(feature = "std"), no_std)]
917
#![crate_name = "concision_core"]
1018

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

14-
extern crate concision_math as math;
1522
extern crate ndarray as nd;
23+
1624
#[cfg(feature = "rand")]
1725
extern crate ndarray_rand as ndrand;
1826

27+
#[doc(inline)]
28+
pub use concision_math as math;
29+
1930
pub use self::error::{Error, ModelError, Result};
2031
pub use self::func::Activate;
2132
pub use self::nn::Module;

‎core/src/math/arith.rs

-68
This file was deleted.

‎core/src/math/mod.rs

-19
This file was deleted.

0 commit comments

Comments
 (0)
Please sign in to comment.