A package for running predictions using fAIr
Project description
fAIr Predictor
Run your fAIr Model Predictions anywhere !
Example on python
# Install
!pip install fairpredictor
import asyncio
from predictor import DEFAULT_OAM_TMS_MOSAIC, DEFAULT_RAMP_MODEL, predict
# Parameters for your predictions
bbox = [100.56228021333352, 13.685230854641182, 100.56383321235313, 13.685961853747969]
model_path = DEFAULT_RAMP_MODEL
zoom_level = 20
tms_url = DEFAULT_OAM_TMS_MOSAIC
# Run your prediction
my_predictions = asyncio.run(predict(bbox, model_path, zoom_level, tms_url))
print(my_predictions)
Works on CPU ! Can work on serverless functions, No other dependencies to run predictions
Load Testing
CAUTION : Always take permission of server admin before you perform load test
In order to perform load testing we use Locust , To enable this hit following command within the root dir
-
Install locust
pip install locust -
Run locust script
locust -f locust.py
Populate your HOST and replace it with BASE URL of the Predictor URL
Docker
Build
sudo docker build . -t fairpredictor
Run
sudo docker run --rm --name fairpredictor -v $(pwd):/mnt -p 8000:8000 fairpredictor
Navigate to localhost:8000 and shoot following request body
{
"bbox": [100.56228021333352, 13.685230854641182, 100.56383321235313, 13.685961853747969],
"checkpoint": "/mnt/tests/checkpoints/ramp/checkpoint.tflite",
"zoom_level": 20,
"source": "https://tiles.openaerialmap.org/6501a65c0906de000167e64d/0/6501a65c0906de000167e64e/{z}/{x}/{y}"
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fairpredictor-0.3.15.tar.gz.
File metadata
- Download URL: fairpredictor-0.3.15.tar.gz
- Upload date:
- Size: 12.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4bb9b20aff9f2b0a7b09c386312c70d175241a9b848d102453bcd7bf1a755108
|
|
| MD5 |
001377ad8c81001c3b1e4541a73228d2
|
|
| BLAKE2b-256 |
ba3b0b65bfcc6e2729e53752d0010e6f62e7b38f4ca83f2b979b55eb54f006cc
|
File details
Details for the file fairpredictor-0.3.15-py3-none-any.whl.
File metadata
- Download URL: fairpredictor-0.3.15-py3-none-any.whl
- Upload date:
- Size: 15.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a46242da241b5b0f7efc9d07965748d5db77fa7bd39a5023889a27460736083b
|
|
| MD5 |
3044154328fe16986d5d414ce71f50b6
|
|
| BLAKE2b-256 |
ac7abfcb844567355a3f65cd9bb866aaa287ba35f39945ca1a7c9f98f6ed0ff4
|