Skip to content

Commit

Permalink
change the job names to be unified with all the other jobs in JumpSta…
Browse files Browse the repository at this point in the history
…rt (aws#3631)

Co-authored-by: atqy <[email protected]>
  • Loading branch information
Neo9061 and atqy committed Oct 28, 2022
1 parent e3afd11 commit 004040c
Showing 1 changed file with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,7 @@
"from sagemaker.estimator import Estimator\n",
"from sagemaker.utils import name_from_base\n",
"\n",
"training_job_name = name_from_base(f\"jumpstart-{train_model_id}-train\")\n",
"training_job_name = name_from_base(\"jumpstart-example-churn-lgb-g\")\n",
"\n",
"# Create SageMaker Estimator instance\n",
"tabular_estimator = Estimator(\n",
Expand All @@ -682,7 +682,7 @@
" \"auc\",\n",
" hyperparameter_ranges_lgb,\n",
" [{\"Name\": \"auc\", \"Regex\": \"auc: ([0-9\\\\.]+)\"}],\n",
" max_jobs=10,\n",
" max_jobs=20,\n",
" max_parallel_jobs=5,\n",
" objective_type=\"Maximize\",\n",
" base_tuning_job_name=training_job_name,\n",
Expand Down Expand Up @@ -721,7 +721,7 @@
"metadata": {},
"outputs": [],
"source": [
"inference_instance_type = \"ml.m5.large\"\n",
"inference_instance_type = \"ml.m5.4xlarge\"\n",
"\n",
"# Retrieve the inference docker container uri\n",
"deploy_image_uri = image_uris.retrieve(\n",
Expand All @@ -737,7 +737,7 @@
" model_id=train_model_id, model_version=train_model_version, script_scope=\"inference\"\n",
")\n",
"\n",
"endpoint_name = name_from_base(f\"jumpstart-lgb-churn-{train_model_id}-\")\n",
"endpoint_name = name_from_base(\"jumpstart-example-churn-lgb-g\")\n",
"\n",
"# Use the estimator from the previous step to deploy to a SageMaker endpoint\n",
"predictor = (tuner if use_amt else tabular_estimator).deploy(\n",
Expand Down Expand Up @@ -1051,7 +1051,7 @@
"from sagemaker.estimator import Estimator\n",
"from sagemaker.utils import name_from_base\n",
"\n",
"training_job_name = name_from_base(f\"jumpstart-{train_model_id}-training\")\n",
"training_job_name = name_from_base(\"jumpstart-example-churn-cat-g\")\n",
"\n",
"# Create SageMaker Estimator instance\n",
"tabular_estimator_cat = Estimator(\n",
Expand All @@ -1074,7 +1074,7 @@
" \"AUC\",\n",
" hyperparameter_ranges_cat,\n",
" [{\"Name\": \"AUC\", \"Regex\": \"bestTest = ([0-9\\\\.]+)\"}],\n",
" max_jobs=10,\n",
" max_jobs=20,\n",
" max_parallel_jobs=5,\n",
" objective_type=\"Maximize\",\n",
" base_tuning_job_name=training_job_name,\n",
Expand Down Expand Up @@ -1103,7 +1103,7 @@
"metadata": {},
"outputs": [],
"source": [
"inference_instance_type = \"ml.m5.large\"\n",
"inference_instance_type = \"ml.m5.4xlarge\"\n",
"\n",
"# Retrieve the inference docker container uri\n",
"deploy_image_uri = image_uris.retrieve(\n",
Expand All @@ -1119,7 +1119,7 @@
" model_id=train_model_id, model_version=train_model_version, script_scope=\"inference\"\n",
")\n",
"\n",
"endpoint_name_cat = name_from_base(f\"jumpstart-cat-churn-{train_model_id}-\")\n",
"endpoint_name_cat = name_from_base(\"jumpstart-example-churn-cat-g\")\n",
"\n",
"# Use the estimator from the previous step to deploy to a SageMaker endpoint\n",
"predictor_cat = (tuner_cat if use_amt else tabular_estimator_cat).deploy(\n",
Expand Down Expand Up @@ -1361,7 +1361,7 @@
"metadata": {},
"outputs": [],
"source": [
"training_job_name = name_from_base(f\"jumpstart-{train_model_id}-training\")\n",
"training_job_name = name_from_base(\"jumpstart-example-churn-tt-g\")\n",
"\n",
"# Create SageMaker Estimator instance\n",
"tabular_estimator_tab = Estimator(\n",
Expand All @@ -1384,7 +1384,7 @@
" \"f1_score\", # Note, TabTransformer currently does not support AUC score, thus we use its default setting F1 score as an alternative evaluation metric.\n",
" hyperparameter_ranges_tab,\n",
" [{\"Name\": \"f1_score\", \"Regex\": \"metrics={'f1': (\\\\S+)}\"}],\n",
" max_jobs=10,\n",
" max_jobs=20,\n",
" max_parallel_jobs=5, # reduce max_parallel_jobs number if the instance type is limited in your account\n",
" objective_type=\"Maximize\",\n",
" base_tuning_job_name=training_job_name,\n",
Expand Down Expand Up @@ -1414,7 +1414,7 @@
"metadata": {},
"outputs": [],
"source": [
"inference_instance_type = \"ml.m5.2xlarge\"\n",
"inference_instance_type = \"ml.m5.4xlarge\"\n",
"\n",
"# Retrieve the inference docker container uri\n",
"deploy_image_uri = image_uris.retrieve(\n",
Expand All @@ -1430,7 +1430,7 @@
" model_id=train_model_id, model_version=train_model_version, script_scope=\"inference\"\n",
")\n",
"\n",
"endpoint_name_tab = name_from_base(f\"jumpstart-tabtransformer-churn-{train_model_id}-\")\n",
"endpoint_name_tab = name_from_base(\"jumpstart-example-churn-tt-g\")\n",
"\n",
"# Use the estimator from the previous step to deploy to a SageMaker endpoint\n",
"predictor_tab = (tuner_tab if use_amt else tabular_estimator_tab).deploy(\n",
Expand Down Expand Up @@ -1638,7 +1638,7 @@
"from sagemaker.estimator import Estimator\n",
"from sagemaker.utils import name_from_base\n",
"\n",
"training_job_name = name_from_base(f\"jumpstart-{train_model_id}-training\")\n",
"training_job_name = name_from_base(\"jumpstart-example-churn-ag-g\")\n",
"\n",
"# Create SageMaker Estimator instance\n",
"tabular_estimator_ag = Estimator(\n",
Expand Down Expand Up @@ -1676,7 +1676,7 @@
"metadata": {},
"outputs": [],
"source": [
"inference_instance_type = \"ml.m5.2xlarge\"\n",
"inference_instance_type = \"ml.m5.4xlarge\"\n",
"\n",
"# Retrieve the inference docker container uri\n",
"deploy_image_uri = image_uris.retrieve(\n",
Expand All @@ -1692,7 +1692,7 @@
" model_id=train_model_id, model_version=train_model_version, script_scope=\"inference\"\n",
")\n",
"\n",
"endpoint_name_ag = name_from_base(f\"jumpstart-ag-churn-{train_model_id}-\")\n",
"endpoint_name_ag = name_from_base(\"jumpstart-example-churn-ag-g\")\n",
"\n",
"# Use the estimator from the previous step to deploy to a SageMaker endpoint\n",
"predictor_ag = tabular_estimator_ag.deploy(\n",
Expand Down Expand Up @@ -1854,4 +1854,4 @@
},
"nbformat": 4,
"nbformat_minor": 5
}
}

0 comments on commit 004040c

Please sign in to comment.