Skip to content

ADD Documentation to ReadtheDocs for Upgrading torch versions #5090

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

Merged
merged 7 commits into from
Mar 17, 2025
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
5 changes: 5 additions & 0 deletions doc/overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ To train a model by using the SageMaker Python SDK, you:

After you train a model, you can save it, and then serve the model as an endpoint to get real-time inferences or get inferences for an entire dataset by using batch transform.


Important Note:

* When using torch to load Models, it is recommended to use version torch>=2.6.0 and torchvision>=0.17.0

Prepare a Training script
=========================

Expand Down
22 changes: 6 additions & 16 deletions tests/integ/sagemaker/experiments/test_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
from sagemaker.experiments.trial_component import _TrialComponent
from sagemaker.sklearn import SKLearn
from sagemaker.utils import retry_with_backoff, unique_name_from_base
from tests.integ.sagemaker.experiments.helpers import name, cleanup_exp_resources, clear_run_context
from tests.integ.sagemaker.experiments.helpers import name, cleanup_exp_resources
from sagemaker.experiments.run import (
RUN_NAME_BASE,
DELIMITER,
Expand All @@ -55,7 +55,7 @@ def artifact_file_path(tempdir):
metric_name = "Test-Local-Init-Log-Metric"


def test_local_run_with_load(sagemaker_session, artifact_file_path, clear_run_context):
def test_local_run_with_load(sagemaker_session, artifact_file_path):
exp_name = f"My-Local-Exp-{name()}"
with cleanup_exp_resources(exp_names=[exp_name], sagemaker_session=sagemaker_session):
# Run name is not provided, will create a new TC
Expand Down Expand Up @@ -86,9 +86,7 @@ def verify_load_run():
retry_with_backoff(verify_load_run, 4)


def test_two_local_run_init_with_same_run_name_and_different_exp_names(
sagemaker_session, clear_run_context
):
def test_two_local_run_init_with_same_run_name_and_different_exp_names(sagemaker_session):
exp_name1 = f"my-two-local-exp1-{name()}"
exp_name2 = f"my-two-local-exp2-{name()}"
run_name = "test-run"
Expand Down Expand Up @@ -126,9 +124,7 @@ def test_two_local_run_init_with_same_run_name_and_different_exp_names(
("my-test4", "test-run", "run-display-name-test"), # with supplied display name
],
)
def test_run_name_vs_trial_component_name_edge_cases(
sagemaker_session, input_names, clear_run_context
):
def test_run_name_vs_trial_component_name_edge_cases(sagemaker_session, input_names):
exp_name, run_name, run_display_name = input_names
with cleanup_exp_resources(exp_names=[exp_name], sagemaker_session=sagemaker_session):
with Run(
Expand Down Expand Up @@ -181,7 +177,6 @@ def test_run_from_local_and_train_job_and_all_exp_cfg_match(
execution_role,
sagemaker_client_config,
sagemaker_metrics_config,
clear_run_context,
):
# Notes:
# 1. The 1st Run created locally and its exp config was auto passed to the job
Expand Down Expand Up @@ -282,7 +277,6 @@ def test_run_from_local_and_train_job_and_exp_cfg_not_match(
execution_role,
sagemaker_client_config,
sagemaker_metrics_config,
clear_run_context,
):
# Notes:
# 1. The 1st Run created locally and its exp config was auto passed to the job
Expand Down Expand Up @@ -369,7 +363,6 @@ def test_run_from_train_job_only(
execution_role,
sagemaker_client_config,
sagemaker_metrics_config,
clear_run_context,
):
# Notes:
# 1. No Run created locally or specified in experiment config
Expand Down Expand Up @@ -420,7 +413,6 @@ def test_run_from_processing_job_and_override_default_exp_config(
execution_role,
sagemaker_client_config,
sagemaker_metrics_config,
clear_run_context,
):
# Notes:
# 1. The 1st Run (run) created locally
Expand Down Expand Up @@ -500,7 +492,6 @@ def test_run_from_transform_job(
execution_role,
sagemaker_client_config,
sagemaker_metrics_config,
clear_run_context,
):
# Notes:
# 1. The 1st Run (run) created locally
Expand Down Expand Up @@ -582,7 +573,6 @@ def test_load_run_auto_pass_in_exp_config_to_job(
execution_role,
sagemaker_client_config,
sagemaker_metrics_config,
clear_run_context,
):
# Notes:
# 1. In local side, load the Run created previously and invoke a job under the load context
Expand Down Expand Up @@ -631,7 +621,7 @@ def test_load_run_auto_pass_in_exp_config_to_job(
)


def test_list(run_obj, sagemaker_session, clear_run_context):
def test_list(run_obj, sagemaker_session):
tc1 = _TrialComponent.create(
trial_component_name=f"non-run-tc1-{name()}",
sagemaker_session=sagemaker_session,
Expand All @@ -653,7 +643,7 @@ def test_list(run_obj, sagemaker_session, clear_run_context):
assert run_tcs[0].experiment_config == run_obj.experiment_config


def test_list_twice(run_obj, sagemaker_session, clear_run_context):
def test_list_twice(run_obj, sagemaker_session):
tc1 = _TrialComponent.create(
trial_component_name=f"non-run-tc1-{name()}",
sagemaker_session=sagemaker_session,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
PYTORCH_SQUEEZENET_MLFLOW_RESOURCE_DIR,
SERVE_SAGEMAKER_ENDPOINT_TIMEOUT,
# SERVE_LOCAL_CONTAINER_TIMEOUT,
PYTHON_VERSION_IS_NOT_310,
# PYTHON_VERSION_IS_NOT_310,
)
from tests.integ.timeout import timeout
from tests.integ.utils import cleanup_model_resources
Expand Down
Loading