Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
jinyoung-lim committed Mar 20, 2024
1 parent 3cebc2e commit bf00090
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 16 deletions.
1 change: 1 addition & 0 deletions src/sagemaker/jumpstart/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -2086,6 +2086,7 @@ def get_schema_version(self) -> str:
def get_region(self) -> str:
return self._region

Check warning on line 2087 in src/sagemaker/jumpstart/types.py

View check run for this annotation

Codecov / codecov/patch

src/sagemaker/jumpstart/types.py#L2087

Added line #L2087 was not covered by tests


HubContentDocument = Union[HubModelDocument, HubNotebookDocument]


Expand Down
28 changes: 24 additions & 4 deletions tests/unit/sagemaker/jumpstart/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -7942,8 +7942,19 @@
"Options": ["no", "epoch", "steps"],
"Scope": "algorithm",
},
{"Name": "save_steps", "Type": "int", "Default": 500, "Min": 1, "Scope": "algorithm"}, # noqa: E501
{"Name": "save_total_limit", "Type": "int", "Default": 1, "Scope": "algorithm"}, # noqa: E501
{
"Name": "save_steps",
"Type": "int",
"Default": 500,
"Min": 1,
"Scope": "algorithm",
}, # noqa: E501
{
"Name": "save_total_limit",
"Type": "int",
"Default": 1,
"Scope": "algorithm",
}, # noqa: E501
{
"Name": "dataloader_drop_last",
"Type": "text",
Expand Down Expand Up @@ -7978,7 +7989,13 @@
"Options": ["constant_with_warmup", "linear"],
"Scope": "algorithm",
},
{"Name": "warmup_steps", "Type": "int", "Default": 0, "Min": 0, "Scope": "algorithm"}, # noqa: E501
{
"Name": "warmup_steps",
"Type": "int",
"Default": 0,
"Min": 0,
"Scope": "algorithm",
}, # noqa: E501
{
"Name": "deepspeed",
"Type": "text",
Expand Down Expand Up @@ -8103,7 +8120,10 @@
"Name": "huggingface-textgeneration:eval-loss",
"Regex": "'eval_loss': ([0-9]+\\.[0-9]+)",
},
{"Name": "huggingface-textgeneration:train-loss", "Regex": "'loss': ([0-9]+\\.[0-9]+)"}, # noqa: E501
{
"Name": "huggingface-textgeneration:train-loss",
"Regex": "'loss': ([0-9]+\\.[0-9]+)",
}, # noqa: E501
],
"InferenceDependencies": [],
"TrainingDependencies": [
Expand Down
18 changes: 6 additions & 12 deletions tests/unit/sagemaker/jumpstart/test_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -942,12 +942,9 @@ def test_hub_instance_varaints():
"SM_NUM_GPUS": "8"
}

assert (
instance_variant.get_image_uri("ml.g5.2xlarge")
== (
"763104351884.dkr.ecr.us-west-2.amazonaws.com/huggingface-pytorch-tgi-inference:2.1.1"
"-tgi1.4.0-gpu-py310-cu121-ubuntu20.04"
)
assert instance_variant.get_image_uri("ml.g5.2xlarge") == (
"763104351884.dkr.ecr.us-west-2.amazonaws.com/huggingface-pytorch-tgi-inference:2.1.1"
"-tgi1.4.0-gpu-py310-cu121-ubuntu20.04"
)

instance_variant = JumpStartInstanceTypeVariants(
Expand All @@ -963,10 +960,7 @@ def test_hub_instance_varaints():
== "meta-training/g5/v1.0.0/train-meta-textgeneration-llama-2-70b.tar.gz"
)

assert (
instance_variant.get_image_uri("ml.p3.xlarge")
== (
"763104351884.dkr.ecr.us-west-2.amazonaws.com/huggingface-pytorch-training"
":2.0.0-transformers4.28.1-gpu-py310-cu118-ubuntu20.04"
)
assert instance_variant.get_image_uri("ml.p3.xlarge") == (
"763104351884.dkr.ecr.us-west-2.amazonaws.com/huggingface-pytorch-training"
":2.0.0-transformers4.28.1-gpu-py310-cu118-ubuntu20.04"
)

0 comments on commit bf00090

Please sign in to comment.