RedBrick AI and AWS Sagemaker integration
Project description
redbrick-sagemaker
This package is an integration between RedBrick AI and AWS sagemaker to allow end-to-end Active Learning on computer vision datasets.
The objective of Active Learning is to label your data in order of information gain to your model. Following this strategy can drastically reduce the amount of data you have to label by only labeling those images that help your model improve.
This package will help you run a full end-to-end process where you will be able to iteratively label your dataset and train your model in true Active Learning fashion.
Setup
Install the redbrick_sagemaker package:
pip install redbrick_sagemaker
Standard RedBrick AI set up:
api_key="TODO"
org_id="TODO"
project_id="TOOD"
# The bucket where sagemaker will read/write predictions and training input/outputs.
s3_bucket_name="TODO"
s3_bucket_prefix="TODO"
# OPTIONAL: only required if you are not running redbrick_sagemaker in an AWS sagemaker notebook instance. If running outside, you have to create a IAM role with full sagemaker access.
role="TODO"
Create a RedBrick AI Active Learning object:
import redbrick_sagemaker
active_learner = redbrick_sagemaker.ActiveLearner(
api_key, org_id, project_id,
s3_bucket=bucket, s3_bucket_prefix=bucket_prefix,
url=url, iam_role=role
)
Begin an Active Learning cycle. Running this for the first time will start a hyperparameter optimization job to train your model.
active_learner.run()
Check on the status of your hyperparameter job.
active_learner.describe()
Once your hyperparameter job is complete, you can re-run to perform inference and update Active Learning priorities.
active_learning.run()
If your hyperparameter job is still processing, but there is a model job that has completed, you can force run an inference.
active_learning.run(force_run=True)
If you want to run training, and inference in one go synchronously, you can simply do:
active_learning.run(wait=True)
Please see the flowchart below for an explanation of the different states and flows.
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
File details
Details for the file redbrick_sagemaker-0.0.2.1.tar.gz
.
File metadata
- Download URL: redbrick_sagemaker-0.0.2.1.tar.gz
- Upload date:
- Size: 17.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.0 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f86881f907cde454cef7bef0ac330691679eabab12d994cdb831b121ff7b39b |
|
MD5 | 7c15e31c5c8647019b0832d1da4fa660 |
|
BLAKE2b-256 | 656ca992fb58c1d76261e145b98d76214c1ffbca6d2845ee1b56848aae923478 |
Provenance
File details
Details for the file redbrick_sagemaker-0.0.2.1-py3-none-any.whl
.
File metadata
- Download URL: redbrick_sagemaker-0.0.2.1-py3-none-any.whl
- Upload date:
- Size: 19.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.0 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7e033da71d84322c096fc3c0a32553d6ee371eae7378d3a64b70f27308ab5ce5 |
|
MD5 | 8b0bbaa4998cc99181244ab64dd14bcd |
|
BLAKE2b-256 | 3e79db8f7328b698a50573d088a3c816ba59ce209f6ecd8d2fb594e6e7eb8108 |