Metadata-Version: 2.4
Name: openspuruntime
Version: 0.1.0
Summary: Remote Alyx I100 SPU runtime: a Flask server tunneled with Cloudflare
License: MIT
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: requests
Provides-Extra: host
Requires-Dist: flask; extra == "host"
Requires-Dist: alyxspu; extra == "host"
Provides-Extra: waitress
Requires-Dist: waitress; extra == "waitress"

# OpenSPURuntime

Use any other computer's Alyx I100 SPU as your own. The host runs a plain Flask
server in front of the `alyxspu` driver and tunnels it with Cloudflare, so no
port forwarding or public IP is needed.

## Installation :

```
pip install "openspuruntime[host]"      # on the machine with the SPU
pip install openspuruntime              # on the client
```

## Streaming :
```
openspuruntime stream --serial-port COM5 --allowed_ip all
```

## Connecting :
```
openspuruntime connect https://random-words.trycloudflare.com/?token=...
```

## Usage :
#### For CLI :
```
openspuruntime calc "sqrt(2)*3 + sin(pi/2)"
openspuruntime build --inputs 2 --hidden 4 --outputs 1
openspuruntime data -c "[[[0,0],[0]],[[0,1],[1]],[[1,0],[1]],[[1,1],[0]]]"
openspuruntime train --epochs 3000 --lr 0.5
openspuruntime run 1 0
```

#### In python :
```python
from openspuruntime import Runtime
rt = Runtime.connect("https://random-words.trycloudflare.com/?token=...")
print(rt.calc("2+2"))
```

## Disconnecting
```
openspuruntime disconnect
```

