Package to run tests against osml-model-runner deployments.
Project description
OSML Model Runner Test
This package contains the integration tests for OSML application
Table of Contents
Getting Started
Prerequisites
First, ensure you have installed the following tools locally
Installation Guide
- Clone
osml-model-runner-test
package into your desktop
git clone https://github.com/aws-solutions-library-samples/osml-model-runner-test.git
- Run
tox
to create a virtual environment
cd osml-model-runner-test
tox
Documentation
You can find documentation for this library in the ./doc
directory. Sphinx is used to construct a searchable HTML
version of the API documents.
tox -e docs
Build and Local Testing
You can run the hydra tests against your dev account by exporting the required parameters and using the pytest CLI by
using the demo utility bin/run_test.sh
. Do not forget to load up your AWS credentials into your terminal, please follow this guide on how to load your aws credentials.
export ACCOUNT="INSERT YOUR ACCOUNT"
export IMAGE_TYPE="INSERT YOUR IMAGE TYPE" # small, medium, large, or tile.<tif|ntf|jpeg|png>
export MODEL_TYPE="INSERT YOUR MODEL TYPE" # centerpoint, flood, or aircraft
./bin/run_test.sh ${IMAGE_TYPE} ${MODEL_TYPE} NITF JPEG us-west-2 $ACCOUNT_NUMBER
Examples:
./bin/run_test.sh small centerpoint NITF JPEG us-west-2 $ACCOUNT_NUMBER
./bin/run_test.sh medium flood NITF JPEG us-west-2 $ACCOUNT_NUMBER
./bin/run_test.sh large centerpoint NITF JPEG us-west-2 $ACCOUNT_NUMBER
./bin/run_test.sh tile.tif aircraft NITF JPEG us-west-2 $ACCOUNT_NUMBER
If you prefer, you can execute the python script:
python3 bin/process_image.py --image small --model centerpoint
To print out the usage for python script, execute:
python3 bin/process_image.py --help
Running Tests in Docker
Arguments can be passed in to docker run in the same way that they are provided to the shell script. For example, the container can be built and run as follows:
docker build . -t model-runner-hydra-test:latest
docker run -v ~/.aws:/root/.aws model-runner-hydra-test:latest small centerpoint NITF JPEG us-west-2 $ACCOUNT_NUMBER
Credentials from the user's account are volume mounted into the container's root directory.
Running LoadTest
You can run the load test against your dev account and be able to determine the cost and the performance. Please advise it can potentially rack up your AWS bills!
Examples:
python3 bin/run_load_test.py --periodic_sleep 60 --processing_window 1
To print out the usage for this load test script, execute:
python3 bin/run_load_test.py --help
Support & Feedback
To post feedback, submit feature ideas, or report bugs, please use the Issues section of this GitHub repo.
If you are interested in contributing to OversightML Model Runner, see the CONTRIBUTING guide.
Security
See CONTRIBUTING for more information.
License
MIT No Attribution Licensed. See LICENSE.
Project details
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
Hashes for osml-model-runner-test-1.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a68c44eb3c0325290276e7ceeef6925cbba41684aee524f8c2ca7298afc593da |
|
MD5 | 0a2338cb83945affb586dea01d0971c0 |
|
BLAKE2b-256 | 8888a1186eb9f3332fcdbd100997db447076df003e835d9506446698c210f4c1 |
Hashes for osml_model_runner_test-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | be22fcbc05cbb8e7401656a875241d1b9f06515144865eedfdbc866e9d801780 |
|
MD5 | ad6884eb383f4b0ebca7e18b4e0c4572 |
|
BLAKE2b-256 | 53a12c95ec9d492e133dd0727d297da98a4b02e880b45456d3c6d8c58725aa98 |