"docker/vscode:/vscode.git/clone" did not exist on "af27c0cc81e76199cfbfb5f1ca4cf1a360802fe4"
Unverified Commit e3c8443f authored by Philipp Schmid's avatar Philipp Schmid Committed by GitHub
Browse files

improved sagemaker documentation for git_config and examples (#10966)

* improved branch usage

* fixed grammar and comma
parent 83d38c9f
......@@ -275,7 +275,7 @@ huggingface_estimator = HuggingFace(
transformers_version='4.4.2',
pytorch_version='1.6.0',
py_version='py36',
hyperparameters = hyperparameters
hyperparameters = hyperparameters,
distribution = distribution
)
```
......@@ -323,7 +323,9 @@ huggingface_estimator = HuggingFace(
### Git Repository
When you create a `HuggingFace` Estimator, you can specify a [training script that is stored in a GitHub repository](https://sagemaker.readthedocs.io/en/stable/overview.html#use-scripts-stored-in-a-git-repository) as the entry point for the estimator, so that you don’t have to download the scripts locally. If Git support is enabled, then `entry_point` and `source_dir` should be relative paths in the Git repo if provided.
When you create a `HuggingFace` Estimator, you can specify a [training script that is stored in a GitHub repository](https://sagemaker.readthedocs.io/en/stable/overview.html#use-scripts-stored-in-a-git-repository) as the entry point for the estimator, so that you don’t have to download the scripts locally. If Git support is enabled, the `entry_point` and `source_dir` should be relative paths in the Git repo if provided.
If you are using `git_config` to run the [🤗 Transformers examples scripts](https://github.com/huggingface/transformers/tree/master/examples) keep in mind that you need to configure the right `'branch'` for you `transformers_version`, e.g. if you use `transformers_version='4.4.2` you have to use `'branch':'v4.4.2'`.
As an example to use `git_config` with an [example script from the transformers repository](https://github.com/huggingface/transformers/tree/master/examples/text-classification).
......@@ -333,7 +335,7 @@ _Tip: define `output_dir` as `/opt/ml/model` in the hyperparameter for the scrip
```python
# configure git settings
git_config = {'repo': 'https://github.com/huggingface/transformers.git','branch': 'master'}
git_config = {'repo': 'https://github.com/huggingface/transformers.git','branch': 'v4.4.2'} # v4.4.2 is referring to the `transformers_version you use in the estimator.
# create the Estimator
huggingface_estimator = HuggingFace(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment