Skip to content

Commit

Permalink
Merge pull request #61 from FL03/v0.1.14
Browse files Browse the repository at this point in the history
V0.1.14
  • Loading branch information
FL03 authored May 25, 2024
2 parents d1aa8e2 + 0d5b03c commit d09a22b
Show file tree
Hide file tree
Showing 377 changed files with 7,867 additions and 1,910 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions nn/nn/Cargo.toml → .artifacts/archive/nn/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ blas = [
"concision-nlp/blas",
"concision-optim/blas",
"concision-s4/blas",
"concision-transformers/blas",
"transformers?/blas",
]

intel-mkl-system = [
Expand Down Expand Up @@ -104,13 +104,13 @@ concision-neural = { path = "../neural", version = "0.1.12" }
concision-nlp = { optional = true, path = "../nlp", version = "0.1.12" }
concision-optim = { optional = true, path = "../optim", version = "0.1.12" }
concision-s4 = { optional = true, path = "../s4", version = "0.1.12" }
concision-transformers = { optional = true, path = "../transformers", version = "0.1.12" }
transformers = { optional = true, path = "../transformers", version = "0.1.12" }


[dev-dependencies]
anyhow = "1"
approx = "0.5"
concision = { path = "../../concision" }
concision = { path = "../../../concision" }
ndarray = { features = ["approx-0_5", "serde-1"], version = "0.15" }

[package.metadata.docs.rs]
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion nn/nn/src/lib.rs → .artifacts/archive/nn/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ pub use concision_optim as optim;
#[cfg(feature = "s4")]
pub use concision_s4 as s4;
#[cfg(feature = "transformers")]
pub use concision_transformers as transformers;
pub use transformers as transformers;

pub mod prelude {
pub use concision_neural::prelude::*;
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ edition.workspace = true
homepage.workspace = true
keywords.workspace = true
license.workspace = true
name = "concision-transformers"
name = "transformers"
readme.workspace = true
repository.workspace = true
version.workspace = true
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion .artifacts/license/APACHE.SCSYS.LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2023 Scattered-Systems, DAO LLC
Copyright 2024 Scattered-Systems, LLC

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion .artifacts/license/MIT.LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2023 Joe McCain III
Copyright (c) 2024 Joe McCain III

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/issue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
about: A generic issue template
assignees:
- FL03
labels: []
projects: ['@FL03/concision:features']
name: Generic Issue
title: ''
---

**Describe the proposal or feature that this issue is tracking.**

## Issues

- []

## Pull Requests
14 changes: 8 additions & 6 deletions .github/ISSUE_TEMPLATE/proposal.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
---
name: Proposal
about: A proposal for a new feature or change
title: 'Proposal:'
labels: ['proposal']
projects: ['@FL03/concision:features', '@FL03/concision:roadmap']
about: A formal proposal discussing any new features, changes, or improvements to the project.
assignees:
- FL03

labels: ['proposal']
name: Improvement Proposal
projects: ['@FL03/concision:features', '@FL03/concision:roadmap']
title: 'CNC-0000:'
---


### Resources

- [company](https://github.com/scattered-systems)
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/tracking.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
about: Create a new tracking issue to track the progress of a proposal or feature.
assignees:
- FL03
labels: ['tracking']
projects: ['@FL03/concision:features']
name: Tracking Issue
title: 'Tracking Issue:'
---

**Describe the proposal or feature that this issue is tracking.**

## Issues

- []

## Pull Requests
2 changes: 1 addition & 1 deletion .github/workflows/clippy.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Clippy
name: clippy

on:
pull_request:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/crates.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: crates.io
name: crates

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down
29 changes: 14 additions & 15 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
name: Rust
name: rust

concurrency:
cancel-in-progress: false
group: ${{ github.event.repository.name }}-rust

env:
CARGO_TERM_COLOR: always
CRATE_BASENAME: ${{ github.event.repository.name }}

on:
pull_request:
Expand Down Expand Up @@ -53,12 +54,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: setup (langspace)
- name: rustup
run: |
rustup default nightly
rustup update
- name: Bench
run: cargo bench --all -v
- run: cargo bench --all -v

test:
name: Test
strategy:
Expand All @@ -67,14 +68,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: setup (langspace)
run: |
rustup default ${{ matrix.toolchain }}
rustup update
- name: Test
run: cargo test --features full -v --workspace
- run: rustup default ${{ matrix.toolchain }} && rustup update
- run: cargo test --features full -v --workspace

blas:
continue-on-error: true
env:
PACKAGE_NAME: ${{ github.event.repository.name }}-${{ matrix.crate }}
name: Test (blas)
strategy:
matrix:
Expand All @@ -83,9 +83,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: rustup
run: |
rustup default ${{ matrix.toolchain }}
rustup update
- run: rustup default ${{ matrix.toolchain }} && rustup update
- name: test
run: cargo test --features blas -v --package ${{ github.event.repository.name }}-${{ matrix.crate }}
run: |
cargo clean
cargo test --features blas -v -p ${{ env.PACKAGE_NAME }}
15 changes: 7 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,20 @@ keywords = ["data-science", "scsys", "toolkit"]
license = "Apache-2.0"
readme = "README.md"
repository = "https://github.com/FL03/concision"
version = "0.1.13"
version = "0.1.14"

[workspace.dependencies]
# acme = { features = ["full"], branch = "v0.3.2", git = "https://github.com/FL03/acme", version = "0.3.2" }
# ndtensor = { features = ["full"], branch = "v0.1.1", git = "https://github.com/FL03/ndtensor", version = "0.1" }
# scsys = { features = ["full"], branch = "v0.2.2", git = "https://github.com/scattered-systems/scsys", version = "0.2" }
scsys = { default-features = false, branch = "v0.2.3", features = ["derive"], git = "https://github.com/scattered-systems/scsys.git", version = "0.2" }

approx = "0.5"
itertools = "0.12"
itertools = "0.13"
lazy_static = "1"
ndarray = { default-features = false, version = "0.15" }
ndarray-rand = "0.14"
ndarray-stats = "0.5"
num = { default-features = false, version = "0.4" }
# serde = { features = ["derive"], version = "1" }
# serde_json = "1"
paste = "1"
smart-default = "0.7"
strum = { default-features = false, features = ["derive"], version = "0.26" }

Expand All @@ -33,7 +31,7 @@ default-members = [
]

exclude = [
"nn/*",
".artifacts/archive/*",
]

members = [
Expand All @@ -44,7 +42,8 @@ members = [
"macros",
"models/linear",
"models/gnn",
"models/kan",
"models/kan",
"models/transformers",
]

resolver = "2"
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2023 Joe McCain III
Copyright 2024 Joe McCain III

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
32 changes: 18 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,15 @@

[![clippy](https://github.com/FL03/concision/actions/workflows/clippy.yml/badge.svg)](https://github.com/FL03/concision/actions/workflows/clippy.yml)
[![rust](https://github.com/FL03/concision/actions/workflows/rust.yml/badge.svg)](https://github.com/FL03/concision/actions/workflows/rust.yml)
[![crates.io](https://github.com/FL03/concision/actions/workflows/crates.yml/badge.svg)](https://github.com/FL03/concision/actions/workflows/crates.yml)


***

Concision is designed to be a complete toolkit for building machine learning models in Rust.
### _The library is currently in the early stages of development and is not yet ready for production use._

Concision is designed to be a complete toolkit for building machine learning models in Rust.

Concision is a machine learning library for building powerful models in Rust prioritizing ease-of-use, efficiency, and flexability. The library is built to make use of the
both the upcoming `autodiff` experimental feature and increased support for generics in the 2024 edition of Rust.

## Getting Started

Expand All @@ -28,28 +31,29 @@ cargo build --features full -r --workspace

## Usage

### Example: Linear Model (biased)

```rust
extern crate concision as cnc;

use cnc::func::Sigmoid;
use cnc::linear::{Config, Features, Linear};
use cnc::{linarr, Predict, Result};
use cnc::prelude::{linarr, Linear, Result, Sigmoid};
use ndarray::Ix2;

fn main() -> Result<()> {
tracing_subscriber::fmt::init();
tracing::info!("Starting linear model example");

let (samples, dmodel, features) = (20, 5, 3);
let features = Features::new(3, 5);
let config = Config::new("example", features).biased();
let data = linarr::<f64, Ix2>((samples, dmodel)).unwrap();
let (samples, d_in, d_out) = (20, 5, 3);
let data = linarr::<f64, Ix2>((samples, d_in)).unwrap();

let model = Linear::<f64>::from_features(d_in, d_out).uniform();
// let model = Linear::<f64, cnc::linear::Unbiased>::from_features(d_in, d_out).uniform();

assert!(model.is_biased());

let model: Linear<f64> = Linear::std(config).uniform();
// `.activate(*data, *activation)` runs the forward pass and applies the activation function to the result
let y = model.activate(&data, Sigmoid::sigmoid).unwrap();
assert_eq!(y.dim(), (samples, features));
println!("Predictions: {:?}", y);
assert_eq!(y.dim(), (samples, d_out));
println!("Predictions:\n{:?}", &y);

Ok(())
}
Expand Down
Loading

0 comments on commit d09a22b

Please sign in to comment.