You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit ac1dfa7
Browse filesBrowse the repository at this point in the historyBrowse files
docs(instance-preferences): resolve example images from a candidate type; make the PipeVar override test tox-safe (#6257)
* docs(instance-preferences): resolve the example image from a candidate type
The training notebook and the training guide resolved the PyTorch image
with instance_type="ml.m5.xlarge", which selects the CPU image, and then
paired it with GPU candidates (ml.p5.48xlarge, ml.p4d.24xlarge). A reader
copying either example would run a GPU job on the CPU image.
Both now resolve the image from one of the listed candidates (all three
GPU candidates map to the same pytorch-training:2.0.0-gpu-py310 image),
and state the rule the feature implies: the image is fixed at submission
time while the instance type is not, so every candidate must be able to
run it. The processing notebook and guide are updated the same way for
consistency; the scikit-learn image is CPU-only and all candidates are
m5 types, so their behaviour was already correct.
* test(instance-preferences): decouple the PipeVar override test from the packaged service model
TestInstancePreferencesPipeVarOverrides built a ShapesExtractor from the
real service JSON, which lives under sample/ in the source tree and is not
part of the installed package. Under tox the extractor is imported from
site-packages, the file is absent, and all six cases errored at setup with
FileNotFoundError.
The test now injects a minimal in-memory model that mirrors the real
member -> shape wiring for the six count members, so it exercises exactly
the PIPE_VAR_OVERRIDES lookup and nothing else. A control shape with the
same integer type and no override asserts the widening is targeted rather
than blanket. Removing any one override still fails exactly that member's
case.
* docs(instance-preferences): list the shallow test in the suite README; define processing_image in the guide
The shallow suite README maps each shallow file to its deep counterpart;
the instance-preferences pair was missing. The processing guide's
instance-preferences snippet referenced processing_image without defining
it on the page; it now resolves the image from one of the candidates,
matching the training guide.
Up to 5 candidates are allowed, each instance type at most once, and exactly one is selected; the list is mutually exclusive with ``instance_type``. Counts use exactly one of two modes — a top-level ``instance_count`` shared by whichever candidate wins, or an ``InstanceCount`` on every candidate — and mixed, partial, or omitted counts are rejected. Selection is based on capacity, not on workload fit, so list only types the job can genuinely run on. The winner is reported as ``SelectedInstanceType`` / ``SelectedInstanceCount`` on the job's ``ClusterConfig``, and billing is for that type and count. Supported on ``Processor``, ``ScriptProcessor``, ``PySparkProcessor``, and ``SparkJarProcessor``; training plans are training-only and do not apply to processing.
342
+
Up to 5 candidates are allowed, each instance type at most once, and exactly one is selected; the list is mutually exclusive with ``instance_type``. Counts use exactly one of two modes — a top-level ``instance_count`` shared by whichever candidate wins, or an ``InstanceCount`` on every candidate — and mixed, partial, or omitted counts are rejected. Selection is based on capacity, not on workload fit, so list only types that can run the job's ``image_uri`` (the image is fixed at submission time; the instance type is not). The winner is reported as ``SelectedInstanceType`` / ``SelectedInstanceCount`` on the job's ``ClusterConfig``, and billing is for that type and count. Supported on ``Processor``, ``ScriptProcessor``, ``PySparkProcessor``, and ``SparkJarProcessor``; training plans are training-only and do not apply to processing.
337
343
338
344
:doc:`Instance Preferences example <../v3-examples/ml-ops-examples/v3-processing-instance-preferences>`
0 commit comments