-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpixi.toml
More file actions
71 lines (59 loc) · 3.91 KB
/
Copy pathpixi.toml
File metadata and controls
71 lines (59 loc) · 3.91 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
[workspace]
name = "safetensors-mojo"
version = "0.7.0"
description = "A strict, independent Safetensors format implementation for Mojo"
authors = ["Egor Fyodorov"]
license = "Apache-2.0"
channels = ["https://conda.modular.com/max", "conda-forge"]
platforms = ["linux-64", "linux-aarch64", "osx-arm64"]
preview = ["pixi-build"]
[package]
name = "safetensors-mojo"
version = "0.7.0"
description = "A strict, independent Safetensors format implementation for Mojo"
authors = ["Egor Fyodorov"]
license = "Apache-2.0"
license-file = "LICENSE"
readme = "README.md"
[package.build]
backend = { name = "pixi-build-mojo", version = "0.2.*" }
[package.build.config.pkg]
name = "safetensors"
path = "src/safetensors"
[package.host-dependencies]
mojo-compiler = "==1.0.0"
[package.build-dependencies]
mojo-compiler = "==1.0.0"
[package.run-dependencies]
mojo-compiler = "==1.0.0"
[dependencies]
mojo = "==1.0.0"
[feature.dev.dependencies]
python = "3.12.*"
numpy = ">=2,<3"
safetensors = "==0.8.0"
huggingface_hub = "==1.29.0"
[feature.benchmark.dependencies]
rust = "==1.98.0"
[feature.benchmark.tasks]
benchmark-rust-build = { cmd = "cargo build --release --locked --manifest-path benchmarks/rust/Cargo.toml --target-dir .pixi/benchmarks/rust-target", description = "Build the Rust reference benchmark worker" }
benchmark = { cmd = "python benchmarks/run.py --rust-binary .pixi/benchmarks/rust-target/release/map-first-rust", depends-on = ["benchmark-build", "benchmark-rust-build"], description = "Compare Mojo, Rust, and Python Safetensors open costs" }
[environments]
default = { features = ["dev"], solve-group = "default" }
benchmark = { features = ["dev", "benchmark"], solve-group = "default" }
[tasks]
test = { cmd = "python tools/checks/run_mojo_tests.py", description = "Run every Mojo test suite" }
format = { cmd = "python tools/checks/check_format.py --write", description = "Format Mojo sources" }
format-check = { cmd = "python tools/checks/check_format.py", description = "Check Mojo source formatting without modifying files" }
compile = { cmd = "mojo precompile src/safetensors -o .pixi/safetensors.mojoc", description = "Compile the importable safetensors package" }
fixtures = { cmd = "python tools/fixtures/generate.py", description = "Regenerate committed Safetensors fixtures" }
fixtures-check = { cmd = "python tools/fixtures/generate.py --output-root .pixi/expected-fixtures && diff --recursive --brief fixtures .pixi/expected-fixtures", description = "Verify that committed fixtures are reproducible" }
fuzz-generate = { cmd = "python tools/fuzz/generate_corpus.py", description = "Generate the deterministic hostile Safetensors corpus" }
fuzz = { cmd = "mojo run -I src tests/fuzz/fuzz_harness.mojo .pixi/fuzz-corpus", depends-on = ["fuzz-generate"], description = "Run deterministic survival fuzzing" }
fuzz-index-generate = { cmd = "python tools/fuzz/generate_index_corpus.py", description = "Generate the deterministic hostile shard-index corpus" }
fuzz-index = { cmd = "mojo run -I src tests/fuzz/index_fuzz_harness.mojo .pixi/fuzz-index-corpus", depends-on = ["fuzz-index-generate"], description = "Run the valid index smoke and deterministic shard-index survival fuzzing" }
benchmark-generate = { cmd = "python benchmarks/generate_archive.py", description = "Generate the sparse local benchmark archive" }
benchmark-build = { cmd = "mojo build -I src benchmarks/map_first.mojo -o .pixi/benchmarks/map-first", depends-on = ["benchmark-generate"], description = "Build the native benchmark worker" }
package-build = { cmd = "pixi publish --clean --force --path . --target-dir .pixi/packages", description = "Build the safetensors-mojo Conda package" }
check = { cmd = "python tools/checks/run_checks.py", description = "Run formatting, Python tests, compilation, Mojo tests, and fixture verification sequentially" }
all = { cmd = "python tools/checks/run_checks.py --package", description = "Run all checks, build the Conda package, and smoke-test a clean installation" }