Skip to content

Commit

Permalink
fix: Huggingface glue failing tests (aws#4367)
Browse files Browse the repository at this point in the history
* 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 <mufi@amazon.com>
Co-authored-by: Erick Benitez-Ramos <benieric@amazon.com>
  • Loading branch information
3 people authored and root committed Jan 25, 2024
1 parent b6227f6 commit afc6b72
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
}

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

# -- Options for autodoc ----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html#configuration
Expand Down
2 changes: 1 addition & 1 deletion doc/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
sphinx==3.1.2
sphinx==3.4.3
sphinx-rtd-theme==0.5.0
docutils==0.15.2
packaging==20.9
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def transform(input_feature_group, input_csv):
return ...
Args:
inputs (Sequence[Union[FeatureGroupDataSource, CSVDataSource, ParquetDataSource,
inputs (Sequence[Union[FeatureGroupDataSource, CSVDataSource, ParquetDataSource,\
BaseDataSource]]): A list of data sources.
output (str): A Feature Group ARN to write results of this function to.
target_stores (Optional[list[str]], optional): A list containing at least one of
Expand Down
8 changes: 4 additions & 4 deletions src/sagemaker/jumpstart/estimator.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,8 @@ def __init__(
(Default: None).
model_channel_name (Optional[Union[str, PipelineVariable]]): Name of the channel where
'model_uri' will be downloaded. (Default: None).
metric_definitions (Optional[Union[list[dict[str, str], list[dict[str,
PipelineVariable]]]]): A list of dictionaries that defines the metric(s)
metric_definitions (Optional[list[dict[str, Union[str, PipelineVariable]]]]):
A list of dictionaries that defines the metric(s)
used to evaluate the training jobs. Each dictionary contains two keys: 'Name'
for the name of the metric, and 'Regex' for the regular expression used to extract
the metric from the logs. This should be defined only for jobs that
Expand Down Expand Up @@ -292,8 +292,8 @@ def __init__(
SageMaker Debugger rules for real-time analysis
(Default: None). For more information,
see `Continuous analyses through rules
<https://sagemaker.readthedocs.io/en/stable/amazon_sagemaker_debugger.html
#continuous-analyses-through-rules)>`_.
<https://sagemaker.readthedocs.io/en/stable/amazon_sagemaker_debugger.html#
continuous-analyses-through-rules)>`_.
(Default: None).
debugger_hook_config (Optional[Union[DebuggerHookConfig, bool]]):
Configuration for how debugging information is emitted with
Expand Down
12 changes: 5 additions & 7 deletions src/sagemaker/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -4565,20 +4565,18 @@ def update_inference_component(
Args:
inference_component_name (str): Name of the Amazon SageMaker ``InferenceComponent``.
specification ([dict[str,int]]): Resource configuration. Optional.
Example: {
Example: {
"MinMemoryRequiredInMb": 1024,
"NumberOfCpuCoresRequired": 1,
"NumberOfAcceleratorDevicesRequired": 1,
"MaxMemoryRequiredInMb": 4096,
},
},
runtime_config ([dict[str,int]]): Number of copies. Optional.
Default: {
Default: {
"copyCount": 1
}
}
wait: Wait for inference component to be created before return. Optional. Default is
True.
True.
Return:
str: inference component name
Expand Down
1 change: 1 addition & 0 deletions tests/data/huggingface/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
datasets==2.16.1
2 changes: 1 addition & 1 deletion tests/data/huggingface_byoc/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
transformers<=4.28.1
datasets<=2.12.0
datasets==2.16.1
3 changes: 2 additions & 1 deletion tests/integ/test_huggingface.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ def test_huggingface_training(

hf = HuggingFace(
py_version=huggingface_pytorch_latest_training_py_version,
entry_point=os.path.join(data_path, "run_glue.py"),
source_dir=data_path,
entry_point="run_glue.py",
role="SageMakerRole",
transformers_version=huggingface_training_latest_version,
pytorch_version=huggingface_training_pytorch_latest_version,
Expand Down
4 changes: 2 additions & 2 deletions tests/integ/test_huggingface_torch_distributed.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ def test_huggingface_torch_distributed_g5_glue(
huggingface_pytorch_latest_training_py_version,
):
with timeout.timeout(minutes=TRAINING_DEFAULT_TIMEOUT_MINUTES):
data_path = os.path.join(DATA_DIR, "huggingface")
estimator = HuggingFace(
py_version=huggingface_pytorch_latest_training_py_version,
entry_point=os.path.join(data_path, "run_glue.py"),
source_dir=os.path.join(DATA_DIR, "huggingface"),
entry_point="run_glue.py",
role="SageMakerRole",
transformers_version=huggingface_training_latest_version,
pytorch_version=huggingface_training_pytorch_latest_version,
Expand Down

0 comments on commit afc6b72

Please sign in to comment.