aws / aws/sagemaker-python-sdk

ModelBuilder.register does not generate a repack step with a pipeline session in V3 but does in V2

Offen
#5,828 1 Kommentar 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Python
Sterne
2.3k
Forks
1.3k
Ø Merge
1 T. 22 Std.
Gemergte PRs (30 T.)
35

Beschreibung

**PySDK Version**
- [ ] PySDK V2 (2.x)
- [ X] PySDK V3 (3.x)

**Describe the bug**
ModelBuilder.register does not generate a repack step with a pipeline session in V3 but does in V2

**To reproduce**
A clear, step-by-step set of instructions to reproduce the bug.
The provided code need to be **complete** and **runnable**, if additional data is needed, please include them in the issue.

```
model_builder = ModelBuilder(
image_uri=image_uri,
s3_model_data_url=data_url,
source_code=SourceCode(
entry_script="infer.py",
source_dir=s3_script_archive,
),
role_arn=role,
sagemaker_session=pipeline_session,
env_vars={"SAGEMAKER_DEFAULT_INVOCATIONS_ACCEPT": "application/json"},
)
...
step_register = ModelStep(
name="RegisterModel",
step_args=model_builder.register(
content_types=["application/jsonlines"],
response_types=["application/json"],
inference_instances=[inference_instance_type],
transform_instances=[inference_instance_type],
model_package_group_name=model_package_group_name,
approval_status="Approved",
)
)
```

**Expected behavior**
A clear and concise description of what you expected to happen.
In V2, the model was repacked with the code present. In V3, the model is not, leaving the model unable to be repacked

**Screenshots or logs**
If applicable, add screenshots or logs to help explain your problem.

**System information**
A description of your system. Please provide:
- **SageMaker Python SDK version**: 2
- **Framework name (eg. PyTorch) or algorithm (eg. KMeans)**: ScikitLearn
- **Framework version**: 1.4.2
- **Python version**: 3.11
- **CPU or GPU**: CPU
- **Custom Docker image (Y/N)**: N

**Additional context**
Add any other context about the problem here.

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne am Einstiegspunkt ModelBuilder.register, der mit pipeline_session verwendet wird, und vergleiche sein V3-Verhalten mit dem im Issue beschriebenen V2-Verhalten. Führe die Registrierung von ModelStep mit dem gezeigten SourceCode und den Modelldaten nach und überprüfe anschließend, dass ein repack-Schritt generiert wird und das registrierte Modell den Code enthält.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
aws, python, scikit-learn
Bereich
cloud, machine-learning
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Ruhig
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
48/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.