Skip to content

Commit fc25416

Browse files
committed
reduce size to be able to upload to crate.io
1 parent 475e6b4 commit fc25416

5 files changed

Lines changed: 26 additions & 2 deletions

File tree

Cargo.toml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,18 @@ description = """
1111
A library for doing maching learning in Rust.
1212
"""
1313

14+
# Currently we can only upload up to 10MB. So we need to remove
15+
# everything that is not required for building the library.
16+
exclude = [
17+
"atlas/*",
18+
"build/*",
19+
"build_all.sh",
20+
"doc.sh",
21+
"examples/*",
22+
"datasets/mnist_digits/train-images-idx3-ubyte.gz",
23+
"datasets/mnist_digits/train-labels-idx1-ubyte.gz",
24+
]
25+
1426
[lib]
1527
name = "rustml"
1628
path = "src/lib.rs"

datasets/mnist_digits/README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,10 @@
11
Dataset of digits from http://yann.lecun.com/exdb/mnist/
2+
3+
reduced dataset
4+
5+
# remove 10000 examples
6+
dd if=train-images-idx3-ubyte of=train-images-idx3-ubyte.50k bs=16 count=2450001
7+
gzip -9 train-images-idx3-ubyte.50k
8+
dd if=train-labels-idx1-ubyte of=train-labels-idx1-ubyte.50k bs=1 count=50008
9+
gzip -9 train-labels-idx1-ubyte.50k
10+
7.72 MB
Binary file not shown.
23.7 KB
Binary file not shown.

src/datasets.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ use matrix::*;
1616
/// The database that is used is available at http://yann.lecun.com/exdb/mnist/
1717
/// and contains 60,000 training examples and 10,000 test examples of handwritten
1818
/// digits.
19+
///
20+
/// Currently, due to upload limits at crate.io a smaller training dataset
21+
/// is used with 50,000 training examples.
1922
pub struct MnistDigits;
2023

2124
impl MnistDigits {
@@ -106,8 +109,8 @@ impl MnistDigits {
106109

107110
// TODO location of dataset
108111
MnistDigits::from(
109-
"datasets/mnist_digits/train-images-idx3-ubyte.gz",
110-
"datasets/mnist_digits/train-labels-idx1-ubyte.gz"
112+
"datasets/mnist_digits/train-images-idx3-ubyte.50k.gz",
113+
"datasets/mnist_digits/train-labels-idx1-ubyte.50k.gz"
111114
)
112115
}
113116

0 commit comments

Comments
 (0)