Skip to content

muna-ai/muna-predictors

Repository files navigation

Muna Compiler

Muna logo

Muna compiles stateless Python functions to run anywhere. This project is a playground for testing the Muna compiler. Over time, we expect to open-source more and more of the compiler infrastructure in this project.

Setup Instructions

First, install Muna for Python:

# Run this in Terminal
$ pip install --upgrade muna

Next, head over to the Muna dashboard to generate an access key. Once generated, sign in to the CLI:

# Login to the Muna CLI
$ muna auth login <ACCESS KEY>

Compiling a Function

The predictors directory contains several prediction functions, ranging from very simple functions to AI inference with PyTorch. Internally, we use these functions to test language and library coverage in the compiler. Use the Muna CLI to compile the function, providing the path to the module where the function is defined:

# Compile the decorated function at the module path
$ muna compile --overwrite path/to/module.py

The compiler will load the entrypoint function, create a remote sandbox, and compile the function:

compiling a function

Useful Links

Muna is a product of NatML Inc.