# Vendored sagemaker wheel (queue-capable)

`sagemaker-2.240.1.dev0-py3-none-any.whl`
sha256 `7925c5709d58a6a2818f50a02b1b1daa50e296140ccdbe4ae24124818131bf8d`

## Why this exists

The 385 account (`robotics-new`, `ad2-gaia-wfm`) requires SageMaker training jobs to go through an
AWS Batch queue. A direct `CreateTrainingJob` is denied by an SCP. `launch_sm.py` queues a job via
`sagemaker`'s Batch integration; without a queue-capable `sagemaker` the import fails and (pre-fix)
the launcher would silently fall back to a direct submit, which the account rejects.

This wheel is the queue-capable build. Install it into the **launcher env** (Puget, base python3 used
by `run_sm.sh` -- NOT the docker/training image):

    pip install custom/sagemaker/wheels/sagemaker-2.240.1.dev0-py3-none-any.whl

## What it is (provenance)

Stock AWS SDK code, pre-GA. Built per `TRI-ML/batch_test` (`install/`) from an AWS-provided beta
source tarball (`sagemaker-2.240.1.dev0.tar.gz`), `python -m build --wheel`. `Author: Amazon Web
Services`, `Homepage: github.com/aws/sagemaker-python-sdk`. NOT a TRI-custom patch.

At this version the Batch integration lives under `sagemaker.batch_queueing.queue.Queue`. AWS later
RENAMED it to `sagemaker.aws_batch.training_queue.TrainingQueue` and shipped it publicly from
**sagemaker 2.249.0** (2025-07-31). `batch_queueing` never appeared in a public release.

## Public alternative

`launch_sm.py` imports `aws_batch.TrainingQueue` first and falls back to `batch_queueing.Queue`, so
either works. To use public PyPI instead of this wheel:

    pip install 'sagemaker>=2.249.0'

The `.map()` signature is identical across both (only the first arg name differs: `training_job=` vs
`estimator=`, which the launcher passes positionally). Kept this wheel as the pinned, known-good
default; it requires `sagemaker-core<2.0`, so do NOT install it into the docker/training env (that env
uses AnyData's `sagemaker==2.256.1`, which needs `sagemaker-core>=2.14` -- they are mutually exclusive,
but the launcher env never has AnyData so there is no conflict).
