https://github.com/danielathome19/python-rust-ai-train-inference

A repository for various ML/DL examples

https://github.com/danielathome19/python-rust-ai-train-inference

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (8.2%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

A repository for various ML/DL examples

Basic Info
  • Host: GitHub
  • Owner: danielathome19
  • Language: Python
  • Default Branch: main
  • Size: 67.4 KB
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created over 1 year ago · Last pushed over 1 year ago
Metadata Files
Readme

README.md

Python train/Rust inference examples for AI models

This repository demonstrates various machine learning and deep learning models using different libraries. Each example includes a Python script to define and train the model and a Rust file to demonstrate inference. The models are saved in ONNX format to ensure they can be reloaded and used for inference in Rust.

Repository Structure

The repository is organized as follows:

  • scikit-learn/
    • regression/
    • classification/
    • clustering/
    • dimensionality-reduction/
  • tensorflow/
    • mlp/
    • cnn/
    • rnn/
    • lstm/
    • gan/
  • lightning/
    • fnn/
    • cnn/
    • rnn/
  • perceptron/

Instructions

Running the Python Training Scripts

  1. Navigate to the desired example directory (e.g., scikit-learn/regression/).
  2. Run the Python training script to train the model and save it in ONNX format: bash python train.py

Running the Rust Inference Scripts

  1. Navigate to the root directory.
  2. Find the [bin] name of the inference example you want to run from the Cargo.toml file or by running the command: bash cargo metadata --format-version 1 | jq -r '.packages[] | select(.name == "python-rust-ai") | .targets[] | select(.kind[] == "bin") | .name'
  3. Run the Rust inference script to load the ONNX model and perform inference on new data: bash cargo run --bin BINARY_NAME Or, use the justfile as shorthand: bash just run BINARY_NAME # or just r BINARY_NAME

Owner

  • Name: Daniel J. Szelogowski
  • Login: danielathome19
  • Kind: user
  • Location: Wisconsin
  • Company: @MECS-Research-Lab

Standing on the shoulders of giants.

GitHub Events

Total
  • Push event: 1
  • Public event: 1
Last Year
  • Push event: 1
  • Public event: 1

Dependencies

Cargo.lock cargo
  • 213 dependencies
Cargo.toml cargo
requirements.txt pypi
  • GitPython ==3.1.43
  • Jinja2 ==3.1.4
  • Markdown ==3.7
  • MarkupSafe ==2.1.5
  • PyYAML ==6.0.2
  • Pygments ==2.18.0
  • Send2Trash ==1.8.3
  • Werkzeug ==3.1.3
  • absl-py ==2.1.0
  • aiohappyeyeballs ==2.4.4
  • aiohttp ==3.11.10
  • aiosignal ==1.3.1
  • anyio ==4.6.0
  • argon2-cffi ==23.1.0
  • argon2-cffi-bindings ==21.2.0
  • arrow ==1.3.0
  • asttokens ==2.4.1
  • astunparse ==1.6.3
  • async-lru ==2.0.4
  • attrs ==24.2.0
  • babel ==2.16.0
  • beautifulsoup4 ==4.12.3
  • bleach ==6.1.0
  • certifi ==2024.8.30
  • cffi ==1.17.1
  • charset-normalizer ==3.3.2
  • colorama ==0.4.6
  • coloredlogs ==15.0.1
  • comm ==0.2.2
  • contourpy ==1.3.0
  • cycler ==0.12.1
  • debugpy ==1.8.6
  • decorator ==5.1.1
  • defusedxml ==0.7.1
  • executing ==2.1.0
  • fastjsonschema ==2.20.0
  • filelock ==3.13.1
  • flatbuffers ==24.3.25
  • fonttools ==4.54.1
  • fqdn ==1.5.1
  • frozenlist ==1.5.0
  • fsspec ==2024.2.0
  • gast ==0.6.0
  • gitdb ==4.0.11
  • google-pasta ==0.2.0
  • grpcio ==1.68.1
  • h11 ==0.14.0
  • h5py ==3.12.1
  • httpcore ==1.0.5
  • httpx ==0.27.2
  • humanfriendly ==10.0
  • idna ==3.10
  • ipykernel ==6.29.5
  • ipython ==8.27.0
  • isoduration ==20.11.0
  • jedi ==0.19.1
  • joblib ==1.4.2
  • json5 ==0.9.25
  • jsonpointer ==3.0.0
  • jsonschema ==4.23.0
  • jsonschema-specifications ==2023.12.1
  • jupyter-events ==0.10.0
  • jupyter-lsp ==2.2.5
  • jupyter-server-mathjax ==0.2.6
  • jupyter_client ==8.6.3
  • jupyter_core ==5.7.2
  • jupyter_server ==2.14.2
  • jupyter_server_terminals ==0.5.3
  • jupyterlab ==4.2.5
  • jupyterlab_git ==0.50.1
  • jupyterlab_pygments ==0.3.0
  • jupyterlab_server ==2.27.3
  • keras ==3.7.0
  • kiwisolver ==1.4.7
  • libclang ==18.1.1
  • lightning ==2.4.0
  • lightning-utilities ==0.11.9
  • markdown-it-py ==3.0.0
  • matplotlib ==3.9.2
  • matplotlib-inline ==0.1.7
  • mdurl ==0.1.2
  • mistune ==3.0.2
  • ml-dtypes ==0.4.1
  • mpmath ==1.3.0
  • multidict ==6.1.0
  • namex ==0.0.8
  • nbclient ==0.10.0
  • nbconvert ==7.16.4
  • nbdime ==4.0.2
  • nbformat ==5.10.4
  • nest-asyncio ==1.6.0
  • networkx ==3.2.1
  • notebook_shim ==0.2.4
  • numpy ==2.0.2
  • nvidia-cublas-cu12 ==12.4.5.8
  • nvidia-cuda-cupti-cu12 ==12.4.127
  • nvidia-cuda-nvrtc-cu12 ==12.4.127
  • nvidia-cuda-runtime-cu12 ==12.4.127
  • nvidia-cudnn-cu12 ==9.1.0.70
  • nvidia-cufft-cu12 ==11.2.1.3
  • nvidia-curand-cu12 ==10.3.5.147
  • nvidia-cusolver-cu12 ==11.6.1.9
  • nvidia-cusparse-cu12 ==12.3.1.170
  • nvidia-nccl-cu12 ==2.21.5
  • nvidia-nvjitlink-cu12 ==12.4.127
  • nvidia-nvtx-cu12 ==12.4.127
  • onnx ==1.17.0
  • onnxconverter-common ==1.14.0
  • onnxruntime ==1.20.1
  • opt_einsum ==3.4.0
  • optree ==0.13.1
  • overrides ==7.7.0
  • packaging ==24.1
  • pandas ==2.2.3
  • pandocfilters ==1.5.1
  • parso ==0.8.4
  • pexpect ==4.9.0
  • pillow ==10.4.0
  • platformdirs ==4.3.6
  • plotly ==5.24.1
  • prometheus_client ==0.21.0
  • prompt_toolkit ==3.0.48
  • propcache ==0.2.1
  • protobuf ==3.20.2
  • psutil ==6.0.0
  • ptyprocess ==0.7.0
  • pure_eval ==0.2.3
  • pycparser ==2.22
  • pyparsing ==3.1.4
  • python-dateutil ==2.9.0.post0
  • python-json-logger ==2.0.7
  • pytorch-lightning ==2.4.0
  • pytz ==2024.2
  • pyzmq ==26.2.0
  • referencing ==0.35.1
  • requests ==2.32.3
  • rfc3339-validator ==0.1.4
  • rfc3986-validator ==0.1.1
  • rich ==13.9.4
  • rpds-py ==0.20.0
  • rust-just ==1.38.0
  • scikit-learn ==1.5.2
  • scipy ==1.14.1
  • seaborn ==0.13.2
  • setuptools ==75.1.0
  • six ==1.16.0
  • skl2onnx ==1.17.0
  • smmap ==5.0.1
  • sniffio ==1.3.1
  • soupsieve ==2.6
  • stack-data ==0.6.3
  • sympy ==1.13.1
  • tenacity ==9.0.0
  • tensorboard ==2.18.0
  • tensorboard-data-server ==0.7.2
  • tensorflow ==2.18.0
  • termcolor ==2.5.0
  • terminado ==0.18.1
  • tf2onnx ==1.16.1
  • threadpoolctl ==3.5.0
  • tinycss2 ==1.3.0
  • torch ==2.5.1
  • torchmetrics ==1.6.0
  • torchvision ==0.20.1
  • tornado ==6.4.1
  • tqdm ==4.67.1
  • traitlets ==5.14.3
  • triton ==3.1.0
  • types-python-dateutil ==2.9.0.20240906
  • typing_extensions ==4.9.0
  • tzdata ==2024.2
  • uri-template ==1.3.0
  • urllib3 ==2.2.3
  • wcwidth ==0.2.13
  • webcolors ==24.8.0
  • webencodings ==0.5.1
  • websocket-client ==1.8.0
  • wheel ==0.45.1
  • wrapt ==1.17.0
  • yarl ==1.18.3