Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: refactoring load test #13

Merged
merged 1 commit into from
Oct 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 14 additions & 12 deletions bin/run_load_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,20 @@

# set up a cli tool for the script using argparse
parser = argparse.ArgumentParser("process_image")
parser.add_argument("--image_bucket", help="The target image bucket to process with OSML Model Runner.", type=str)
parser.add_argument("--result_bucket", help="The target result bucket to store outputs from OSML Model Runner", type=str)
parser.add_argument("--model", help="The target model to use for object detection.", type=str, default="aircraft")
parser.add_argument("--image_bucket", help="Target image bucket to process with OSML Model Runner.", type=str)
parser.add_argument("--result_bucket", help="Target result bucket to store outputs from OSML Model Runner", type=str)
parser.add_argument("--model", help="Target model to use for object detection.", type=str, default="aircraft")
parser.add_argument("--processing_window", help="How long do we want to run the test for (in hours)", type=str)
parser.add_argument("--periodic_sleep", help="Periodically send a new image request (in seconds)", type=str, default="60")
parser.add_argument("--tile_format", help="The target tile format to use for tiling.", type=str)
parser.add_argument("--tile_compression", help="The compression used for the target image.", type=str)
parser.add_argument("--tile_size", help="The tile size to split the image into for model processing.", type=str)
parser.add_argument("--tile_overlap", help="The tile overlap to consider when processing regions.", type=str)
parser.add_argument("--region", help="The AWS region OSML is deployed to.", type=str, default=default_region)
parser.add_argument("--account", help="The AWS account OSML is deployed to.", type=str, default=default_account)
parser.add_argument("--periodic_sleep", help="Periodically send a new image request (seconds)", type=str, default="60")
parser.add_argument("--tile_format", help="Target tile format to use for tiling.", type=str)
parser.add_argument("--tile_compression", help="Compression used for the target image.", type=str)
parser.add_argument("--tile_size", help="Tile size to split the image into for model processing.", type=str)
parser.add_argument("--tile_overlap", help="Tile overlap to consider when processing regions.", type=str)
parser.add_argument("--region", help="AWS region OSML is deployed to.", type=str, default=default_region)
parser.add_argument("--account", help="AWS account OSML is deployed to.", type=str, default=default_account)
args = parser.parse_args()

# call into root directory of this package so that we can run this script from anywhere.
# call into the root directory of this package so that we can run this script from anywhere.
os.chdir(os.path.join(os.path.dirname(os.path.abspath(__file__)), ".."))

# set the python path to include the project source
Expand All @@ -53,7 +53,7 @@
os.environ["S3_LOAD_TEST_RESULT_BUCKET"] = result_bucket
os.environ["S3_RESULTS_BUCKET"] = result_bucket
os.environ["PERIODIC_SLEEP_SECS"] = args.periodic_sleep
os.environ["PROCESSING_WINDOW_HRS"] = args.processing_window
os.environ["PROCESSING_WINDOW_MIN"] = args.processing_window

if args.tile_format:
os.environ["TILE_FORMAT"] = args.tile_format
Expand All @@ -63,6 +63,8 @@
os.environ["TILE_SIZE"] = args.tile_size
if args.tile_overlap:
os.environ["TILE_OVERLAP"] = args.tile_overlap
if args.model:
os.environ["SM_LOAD_TEST_MODEL"] = args.model

test = "src/aws/osml/load/load_test.py"

Expand Down
1 change: 1 addition & 0 deletions logs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ python_requires = >=3.9
include_package_data = True

install_requires =
boto3==1.28.1
botocore==1.31.1
boto3==1.28.57
botocore==1.31.57
geojson==3.0.1
pytest==7.3.1
setuptools==68.0.0
Expand Down
Loading