Skip to content

Commit d083396

Browse files
mufaddal-rohawalamufiAmazonbenieric
authored
fix: Huggingface glue failing tests (#4367)
* fix: Huggingface glue failing tests * fix: Sphinx doc build failure * fix: Huggingface glue failing tests * fix: failing sphinx tests * fix: failing sphinx tests * fix: failing black check * fix: sphinx doc errors * fix: sphinx doc errors * sphinx * black-format * sphinx * sphinx * sphinx --------- Co-authored-by: Mufaddal Rohawala <[email protected]> Co-authored-by: Erick Benitez-Ramos <[email protected]>
1 parent f2b47ab commit d083396

File tree

9 files changed

+18
-18
lines changed

9 files changed

+18
-18
lines changed

doc/conf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
}
9595

9696
# Example configuration for intersphinx: refer to the Python standard library.
97-
intersphinx_mapping = {"http://docs.python.org/": None}
97+
intersphinx_mapping = {"python": ("http://docs.python.org/", None)}
9898

9999
# -- Options for autodoc ----------------------------------------------------
100100
# https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html#configuration

doc/requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
sphinx==3.1.2
1+
sphinx==3.4.3
22
sphinx-rtd-theme==0.5.0
33
docutils==0.15.2
44
packaging==20.9

src/sagemaker/feature_store/feature_processor/feature_processor.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def transform(input_feature_group, input_csv):
7979
return ...
8080
8181
Args:
82-
inputs (Sequence[Union[FeatureGroupDataSource, CSVDataSource, ParquetDataSource,
82+
inputs (Sequence[Union[FeatureGroupDataSource, CSVDataSource, ParquetDataSource,\
8383
BaseDataSource]]): A list of data sources.
8484
output (str): A Feature Group ARN to write results of this function to.
8585
target_stores (Optional[list[str]], optional): A list containing at least one of

src/sagemaker/jumpstart/estimator.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -251,8 +251,8 @@ def __init__(
251251
(Default: None).
252252
model_channel_name (Optional[Union[str, PipelineVariable]]): Name of the channel where
253253
'model_uri' will be downloaded. (Default: None).
254-
metric_definitions (Optional[Union[list[dict[str, str], list[dict[str,
255-
PipelineVariable]]]]): A list of dictionaries that defines the metric(s)
254+
metric_definitions (Optional[list[dict[str, Union[str, PipelineVariable]]]]):
255+
A list of dictionaries that defines the metric(s)
256256
used to evaluate the training jobs. Each dictionary contains two keys: 'Name'
257257
for the name of the metric, and 'Regex' for the regular expression used to extract
258258
the metric from the logs. This should be defined only for jobs that
@@ -292,8 +292,8 @@ def __init__(
292292
SageMaker Debugger rules for real-time analysis
293293
(Default: None). For more information,
294294
see `Continuous analyses through rules
295-
<https://sagemaker.readthedocs.io/en/stable/amazon_sagemaker_debugger.html
296-
#continuous-analyses-through-rules)>`_.
295+
<https://sagemaker.readthedocs.io/en/stable/amazon_sagemaker_debugger.html#
296+
continuous-analyses-through-rules)>`_.
297297
(Default: None).
298298
debugger_hook_config (Optional[Union[DebuggerHookConfig, bool]]):
299299
Configuration for how debugging information is emitted with

src/sagemaker/session.py

+5-7
Original file line numberDiff line numberDiff line change
@@ -4565,20 +4565,18 @@ def update_inference_component(
45654565
Args:
45664566
inference_component_name (str): Name of the Amazon SageMaker ``InferenceComponent``.
45674567
specification ([dict[str,int]]): Resource configuration. Optional.
4568-
Example: {
4568+
Example: {
45694569
"MinMemoryRequiredInMb": 1024,
45704570
"NumberOfCpuCoresRequired": 1,
45714571
"NumberOfAcceleratorDevicesRequired": 1,
45724572
"MaxMemoryRequiredInMb": 4096,
4573-
},
4574-
4573+
},
45754574
runtime_config ([dict[str,int]]): Number of copies. Optional.
4576-
Default: {
4575+
Default: {
45774576
"copyCount": 1
4578-
}
4579-
4577+
}
45804578
wait: Wait for inference component to be created before return. Optional. Default is
4581-
True.
4579+
True.
45824580
45834581
Return:
45844582
str: inference component name
+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
datasets==2.16.1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
transformers<=4.28.1
2-
datasets<=2.12.0
2+
datasets==2.16.1

tests/integ/test_huggingface.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ def test_huggingface_training(
7171

7272
hf = HuggingFace(
7373
py_version=huggingface_pytorch_latest_training_py_version,
74-
entry_point=os.path.join(data_path, "run_glue.py"),
74+
source_dir=data_path,
75+
entry_point="run_glue.py",
7576
role="SageMakerRole",
7677
transformers_version=huggingface_training_latest_version,
7778
pytorch_version=huggingface_training_pytorch_latest_version,

tests/integ/test_huggingface_torch_distributed.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ def test_huggingface_torch_distributed_g5_glue(
2424
huggingface_pytorch_latest_training_py_version,
2525
):
2626
with timeout.timeout(minutes=TRAINING_DEFAULT_TIMEOUT_MINUTES):
27-
data_path = os.path.join(DATA_DIR, "huggingface")
2827
estimator = HuggingFace(
2928
py_version=huggingface_pytorch_latest_training_py_version,
30-
entry_point=os.path.join(data_path, "run_glue.py"),
29+
source_dir=os.path.join(DATA_DIR, "huggingface"),
30+
entry_point="run_glue.py",
3131
role="SageMakerRole",
3232
transformers_version=huggingface_training_latest_version,
3333
pytorch_version=huggingface_training_pytorch_latest_version,

0 commit comments

Comments
 (0)