Compare commits

...

15 Commits

Author SHA1 Message Date
dante
6e6c3d55b8 Update cat_and_dog.ipynb 2025-02-08 16:51:42 -05:00
dante
2f2dd9ce9b Update cat_and_dog.ipynb 2025-02-08 13:08:42 -05:00
dante
b41f1741ef Update cat_and_dog.ipynb 2025-02-08 12:40:31 -05:00
dante
069d3fcbef Update cat_and_dog.ipynb 2025-02-08 11:54:48 -05:00
dante
29d021aa37 Update cat_and_dog.ipynb 2025-02-07 23:52:38 -05:00
dante
651a19e2da Update cat_and_dog_data.sh 2025-02-07 22:48:47 -05:00
dante
e54ee1b469 Merge branch 'ac/cat-dog' of https://github.com/zkonduit/ezkl into ac/cat-dog 2025-02-06 13:26:27 -05:00
dante
911b7032d0 Update cat_and_dog_data.sh 2025-02-06 13:20:39 -05:00
dante
1710b3c865 Merge branch 'main' into ac/cat-dog 2025-02-06 13:18:32 -05:00
dante
01110791b8 Update rust.yml 2025-02-06 13:18:22 -05:00
dante
a38d318923 fix: pypi publication pipeline (#931) 2025-02-05 23:03:21 -05:00
dante
864990fe2d fix: publishing path 2025-02-05 19:57:13 -05:00
dante
29c3e4f977 fix: bump download artifact to v4 2025-02-05 19:05:29 -05:00
dante
0689115828 fix: ezkl-gpu name (#930) 2025-02-05 18:29:28 -05:00
dante
2e83a6c876 docs: cat-dog example 2025-02-05 20:07:30 +00:00
6 changed files with 1167 additions and 8 deletions

View File

@@ -43,6 +43,9 @@ jobs:
sed "s/ezkl/ezkl-gpu/" pyproject.toml.orig >pyproject.toml
sed "s/0\\.0\\.0/${RELEASE_TAG//v}/" pyproject.toml.orig >pyproject.toml
- name: rename ezkl.pyi to ezkl-gpu.pyi
run: mv ezkl.pyi ezkl-gpu.pyi
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2023-06-27
@@ -92,7 +95,7 @@ jobs:
# needs: [ macos, windows, linux, linux-cross, musllinux, musllinux-cross ]
needs: [linux]
steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: wheels
- name: List Files
@@ -106,7 +109,7 @@ jobs:
continue-on-error: true
uses: pypa/gh-action-pypi-publish@unstable/v1
with:
packages-dir: ./
packages-dir: ./wheels
# publishes to TestPyPI
- name: Publish package distribution to TestPyPI
@@ -114,4 +117,4 @@ jobs:
uses: pypa/gh-action-pypi-publish@unstable/v1
with:
repository-url: https://test.pypi.org/legacy/
packages-dir: ./
packages-dir: ./wheels

View File

@@ -273,7 +273,7 @@ jobs:
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: name: dist-musllinux-${{ matrix.target }}
name: dist-musllinux-${{ matrix.target }}
path: dist
musllinux-cross:
@@ -347,11 +347,11 @@ jobs:
if: "startsWith(github.ref, 'refs/tags/')"
needs: [macos, windows, linux, musllinux, musllinux-cross]
steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
pattern: dist-*
merge-multiple: true
path: dist
path: wheels
- name: List Files
run: ls -R
@@ -366,7 +366,7 @@ jobs:
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@unstable/v1
with:
packages-dir: ./
packages-dir: ./wheels
doc-publish:
@@ -377,7 +377,7 @@ jobs:
needs: pypi-publish
steps:
- uses: actions/checkout@v4
with:
with:
persist-credentials: false
- name: Trigger RTDs build
uses: dfm/rtds-action@v1

View File

@@ -781,6 +781,8 @@ jobs:
run: python -m venv .env --clear; source .env/bin/activate; pip install -r requirements.txt; python -m ensurepip --upgrade
- name: Build python ezkl
run: source .env/bin/activate; unset CONDA_PREFIX; maturin develop --features python-bindings --profile=test-runs
- name: Cat and Dog notebook
run: source .env/bin/activate; cargo nextest run py_tests::tests::cat_and_dog_notebook_
- name: All notebooks
run: source .env/bin/activate; cargo nextest run py_tests::tests::run_notebook_ --test-threads 1
- name: Voice tutorial

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,13 @@
# download tess data
# check if first argument has been set
if [ ! -z "$1" ]; then
DATA_DIR=$1
else
DATA_DIR=data
fi
echo "Downloading data to $DATA_DIR"
if [ ! -d "$DATA_DIR/CATDOG" ]; then
kaggle datasets download tongpython/cat-and-dog -p $DATA_DIR/CATDOG --unzip
fi

View File

@@ -49,6 +49,23 @@ mod py_tests {
std::env::set_var("VOICE_DATA_DIR", format!("{}", voice_data_dir));
}
fn download_catdog_data() {
let cat_and_dog_data_dir = shellexpand::tilde("~/data/catdog_data");
DOWNLOAD_VOICE_DATA.call_once(|| {
let status = Command::new("bash")
.args([
"examples/notebooks/cat_and_dog_data.sh",
&cat_and_dog_data_dir,
])
.status()
.expect("failed to execute process");
assert!(status.success());
});
// set VOICE_DATA_DIR environment variable
std::env::set_var("CATDOG_DATA_DIR", format!("{}", cat_and_dog_data_dir));
}
fn setup_py_env() {
ENV_SETUP.call_once(|| {
// supposes that you have a virtualenv called .env and have run the following
@@ -225,6 +242,20 @@ mod py_tests {
anvil_child.kill().unwrap();
}
#[test]
fn cat_and_dog_notebook_() {
crate::py_tests::init_binary();
let mut anvil_child = crate::py_tests::start_anvil(false);
crate::py_tests::download_catdog_data();
let test_dir: TempDir = TempDir::new("cat_and_dog").unwrap();
let path = test_dir.path().to_str().unwrap();
crate::py_tests::mv_test_(path, "cat_and_dog.ipynb");
run_notebook(path, "cat_and_dog.ipynb");
test_dir.close().unwrap();
anvil_child.kill().unwrap();
}
#[test]
fn reusable_verifier_notebook_() {
crate::py_tests::init_binary();