Skip to content

Commit

Permalink
Automated typo cleanup.
Browse files Browse the repository at this point in the history
Now we have a pre-submission check for these, clean up some old typos.

PiperOrigin-RevId: 453557531
  • Loading branch information
markmcd authored and copybara-github committed Jun 7, 2022
1 parent 649de77 commit 72732a6
Show file tree
Hide file tree
Showing 62 changed files with 81 additions and 81 deletions.
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
if (sys.version_info.major, sys.version_info.minor) == (3, 6):
REQUIRED_PKGS.append('dataclasses')

VIS_REQURE = [
VIS_REQUIRE = [
'numpy',
'PILLOW',
'webp',
Expand All @@ -65,7 +65,7 @@
package_dir={'': 'tools'},
scripts=[],
install_requires=REQUIRED_PKGS,
extras_require={'vis': VIS_REQURE},
extras_require={'vis': VIS_REQUIRE},
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
Expand Down
2 changes: 1 addition & 1 deletion site/en/guide/advanced_autodiff.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1101,7 +1101,7 @@
"id": "M_x7ih5sarvG"
},
"source": [
"In this case, `batch_jacobian` still runs and returns _something_ with the expected shape, but it's contents have an unclear meaning:"
"In this case, `batch_jacobian` still runs and returns _something_ with the expected shape, but its contents have an unclear meaning:"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion site/en/guide/basic_training_loops.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@
"id": "rdpN_3ssG9D5"
},
"source": [
"The initial variables are set here in a fixed way, but Keras comes with any of a number of [initalizers](https://www.tensorflow.org/api_docs/python/tf/keras/initializers) you could use, with or without the rest of Keras."
"The initial variables are set here in a fixed way, but Keras comes with any of a number of [initializers](https://www.tensorflow.org/api_docs/python/tf/keras/initializers) you could use, with or without the rest of Keras."
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions site/en/guide/data.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@
"\n",
"Another common data source that can easily be ingested as a `tf.data.Dataset` is the python generator.\n",
"\n",
"Caution: While this is a convienient approach it has limited portability and scalibility. It must run in the same python process that created the generator, and is still subject to the Python [GIL](https://en.wikipedia.org/wiki/Global_interpreter_lock)."
"Caution: While this is a convenient approach it has limited portability and scalability. It must run in the same python process that created the generator, and is still subject to the Python [GIL](https://en.wikipedia.org/wiki/Global_interpreter_lock)."
]
},
{
Expand Down Expand Up @@ -2631,7 +2631,7 @@
"\n",
"`data.Dataset.rejection_resample` takes a `class_func` argument. This `class_func` is applied to each dataset element, and is used to determine which class an example belongs to for the purposes of balancing.\n",
"\n",
"The goal here is to balance the lable distribution, and the elements of `creditcard_ds` are already `(features, label)` pairs. So the `class_func` just needs to return those labels:"
"The goal here is to balance the label distribution, and the elements of `creditcard_ds` are already `(features, label)` pairs. So the `class_func` just needs to return those labels:"
]
},
{
Expand Down
6 changes: 3 additions & 3 deletions site/en/guide/dtensor_overview.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@
"\n",
"Note: In order to avoid confusions between `Mesh` and `Layout`, the term *dimension* is always associated with `Mesh`, and the term *axis* with `Tensor` and `Layout` in this guide.\n",
"\n",
"The rank of `Layout` should be the same as the rank of the `Tensor` where the `Layout` is applied. For each of the `Tensor`'s axes the `Layout` may specifiy a mesh dimension to shard the tensor across, or specify the axis as \"unsharded\".\n",
"The rank of `Layout` should be the same as the rank of the `Tensor` where the `Layout` is applied. For each of the `Tensor`'s axes the `Layout` may specify a mesh dimension to shard the tensor across, or specify the axis as \"unsharded\".\n",
"The tensor is replicated across any mesh dimensions that it is not sharded across.\n",
"\n",
"The rank of a `Layout` and the number of dimensions of a `Mesh` do not need to match. The `unsharded` axes of a `Layout` do not need to be associated to a mesh dimension, and `unsharded` mesh dimensions do not need to be associated with a `layout` axis.\n",
Expand Down Expand Up @@ -528,7 +528,7 @@
"\n",
"So far you've worked with the `my_first_dtensor`, which is a rank-1 DTensor fully replicated across a dim-1 `Mesh`.\n",
"\n",
"Next create and inspect DTensors that are sharded across a dim-2 `Mesh`. The next example does this with a 3x2 `Mesh` on 6 CPU devices, where size of mesh dimension `'x'` is 3 devices, and and size of mesh dimension`'y'` is 2 devices."
"Next create and inspect DTensors that are sharded across a dim-2 `Mesh`. The next example does this with a 3x2 `Mesh` on 6 CPU devices, where size of mesh dimension `'x'` is 3 devices, and size of mesh dimension`'y'` is 2 devices."
]
},
{
Expand Down Expand Up @@ -696,7 +696,7 @@
"To accomplish this, for each [TensorFlow Graph](https://www.tensorflow.org/guide/intro_to_graphs), DTensor produces and executes an equivalent [SPMD](https://en.wikipedia.org/wiki/SPMD) graph in a procedure called *SPMD expansion*. A few critical steps in DTensor SPMD expansion are:\n",
"\n",
" - Propagating the sharding `Layout` of DTensor in the TensorFlow graph\n",
" - Rewriting TensorFlow Ops on the global DTensor with equivalent TensorFlow Ops on the componenent tensors, inserting collective and communication Ops when necessary\n",
" - Rewriting TensorFlow Ops on the global DTensor with equivalent TensorFlow Ops on the component tensors, inserting collective and communication Ops when necessary\n",
" - Lowering backend neutral TensorFlow Ops to backend specific TensorFlow Ops.\n",
"\n",
"The final result is that **DTensor is a drop-in replacement for Tensor**.\n",
Expand Down
2 changes: 1 addition & 1 deletion site/en/guide/graph_optimization.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
"* *Constant folding optimizer -* Statically infers the value of tensors when possible by folding constant nodes in the graph and materializes the result using constants.\n",
"* *Arithmetic optimizer -* Simplifies arithmetic operations by eliminating common subexpressions and simplifying arithmetic statements. \n",
"* *Layout optimizer -* Optimizes tensor layouts to execute data format dependent operations such as convolutions more efficiently.\n",
"* *Remapper optimizer -* Remaps subgraphs onto more efficient implementations by replacing commonly occuring subgraphs with optimized fused monolithic kernels.\n",
"* *Remapper optimizer -* Remaps subgraphs onto more efficient implementations by replacing commonly occurring subgraphs with optimized fused monolithic kernels.\n",
"* *Memory optimizer -* Analyzes the graph to inspect the peak memory usage for each operation and inserts CPU-GPU memory copy operations for swapping GPU memory to CPU to reduce the peak memory usage.\n",
"* *Dependency optimizer -* Removes or rearranges control dependencies to shorten the critical path for a model step or enables other\n",
"optimizations. Also removes nodes that are effectively no-ops such as Identity.\n",
Expand Down
2 changes: 1 addition & 1 deletion site/en/guide/intro_to_graphs.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,7 @@
" tf.gather(x, [1]) # unused\n",
" return x\n",
"\n",
"# Only needed operations are run during graph exection. The error is not raised.\n",
"# Only needed operations are run during graph execution. The error is not raised.\n",
"print(unused_return_graph(tf.constant([0.0])))"
]
},
Expand Down
2 changes: 1 addition & 1 deletion site/en/guide/migrate/canned_estimators.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,7 @@
"id": "Z0QYolhoZb_k"
},
"source": [
"Finaly, in the next example, we train and evaluate a CART model."
"Finally, in the next example, we train and evaluate a CART model."
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion site/en/guide/migrate/evaluator.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@
"source": [
"## TensorFlow 2: Evaluating a Keras model\n",
"\n",
"In TensorFlow 2, if you use the Keras `Model.fit` API for training, you can evaluate the model with `tf.keras.utils.SidecarEvaluator`. You can also visualize the evaluation metrics in Tensorboard which is not shown in this guide.\n",
"In TensorFlow 2, if you use the Keras `Model.fit` API for training, you can evaluate the model with `tf.keras.utils.SidecarEvaluator`. You can also visualize the evaluation metrics in TensorBoard which is not shown in this guide.\n",
"\n",
"To help demonstrate this, let's first start by defining and training the model:\n"
]
Expand Down
2 changes: 1 addition & 1 deletion site/en/guide/migrate/migrating_feature_columns.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -961,7 +961,7 @@
"\n",
"\\* `output_mode` can be passed to `layers.CategoryEncoding`, `layers.StringLookup`, `layers.IntegerLookup`, and `layers.TextVectorization`.\n",
"\n",
"† `layers.TextVectorization` can handle freeform text input directly (e.g. entire sentences or paragraphs). This is not one-to-one replacement for categorical sequence handling in TF1, but may offer a convinient replacement for ad-hoc text preprocessing.\n",
"† `layers.TextVectorization` can handle freeform text input directly (e.g. entire sentences or paragraphs). This is not one-to-one replacement for categorical sequence handling in TF1, but may offer a convenient replacement for ad-hoc text preprocessing.\n",
"\n",
"Note: Linear estimators, such as `tf.estimator.LinearClassifier`, can handle direct categorical input (integer indices) without an `embedding_column` or `indicator_column`. However, integer indices cannot be passed directly to `tf.keras.layers.Dense` or `tf.keras.experimental.LinearModel`. These inputs should be first encoded with `tf.layers.CategoryEncoding` with `output_mode='count'` (and `sparse=True` if the category sizes are large) before calling into `Dense` or `LinearModel`."
]
Expand Down
2 changes: 1 addition & 1 deletion site/en/guide/migrate/migration_debugging.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@
"source": [
"Compare numerical equivalence for first few training steps.\n",
"\n",
"You can also check the [Validating correctness & numerical equivalence notebook](./validate_correctness.ipynb) for additonal advice for numerical equivalence."
"You can also check the [Validating correctness & numerical equivalence notebook](./validate_correctness.ipynb) for additional advice for numerical equivalence."
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion site/en/guide/migrate/tf1_vs_tf2.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@
" print(e) # <tf.Tensor ...> is out of scope and cannot be used here.\n",
"```\n",
"\n",
"The most straightfoward solution is ensuring that the variable creation and dataset creation are both outside of the `tf.funciton` call. For example:\n",
"The most straightfoward solution is ensuring that the variable creation and dataset creation are both outside of the `tf.function` call. For example:\n",
"\n",
"```python\n",
"class Model(tf.Module):\n",
Expand Down
2 changes: 1 addition & 1 deletion site/en/guide/migrate/upgrade.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
"source": [
"## Recommended upgrade process\n",
"\n",
"The rest of this guide demonstrates how to use the symbol-rewriting script. While the script is easy to use, it is strongly recomended that you use the script as part of the following process: \n",
"The rest of this guide demonstrates how to use the symbol-rewriting script. While the script is easy to use, it is strongly recommended that you use the script as part of the following process: \n",
"\n",
"1. **Unit Test**: Ensure that the code you’re upgrading has a unit test suite with reasonable coverage. This is Python code, so the language won’t protect you from many classes of mistakes. Also ensure that any dependency you have has already been upgraded to be compatible with TensorFlow 2.x.\n",
"\n",
Expand Down
2 changes: 1 addition & 1 deletion site/en/guide/ragged_tensor.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1440,7 +1440,7 @@
"\n",
"1. Use `tf.RaggedTensor.to_list` to convert the ragged tensor to a nested Python list.\n",
"2. Use `tf.RaggedTensor.numpy` to convert the ragged tensor to a NumPy array whose values are nested NumPy arrays.\n",
"3. Decompose the ragged tensor into its components, using the `tf.RaggedTensor.values` and `tf.RaggedTensor.row_splits` properties, or row-paritioning methods such as `tf.RaggedTensor.row_lengths` and `tf.RaggedTensor.value_rowids`.\n",
"3. Decompose the ragged tensor into its components, using the `tf.RaggedTensor.values` and `tf.RaggedTensor.row_splits` properties, or row-partitioning methods such as `tf.RaggedTensor.row_lengths` and `tf.RaggedTensor.value_rowids`.\n",
"4. Use Python indexing to select values from the ragged tensor.\n"
]
},
Expand Down
4 changes: 2 additions & 2 deletions site/en/guide/random_numbers.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@
"source": [
"Note: In theory, you can use constructors such as `from_seed` instead of `split` here to obtain a new generator, but by doing so you lose the guarantee that the new generator is independent of the global generator. You will also run the risk that you may accidentally create two generators with the same seed or with seeds that lead to overlapping random-number streams.\n",
"\n",
"You can do splitting recursively, calling `split` on splitted generators. There are no limits (barring integer overflow) on the depth of recursions."
"You can do splitting recursively, calling `split` on split generators. There are no limits (barring integer overflow) on the depth of recursions."
]
},
{
Expand Down Expand Up @@ -325,7 +325,7 @@
"source": [
"#### Creating generators inside `tf.function` \n",
"\n",
"Creation of generators inside a `tf.function` can only happend during the first run of the function. "
"Creation of generators inside a `tf.function` can only happened during the first run of the function. "
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion site/en/r1/guide/autograph.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"source": [
"> Note: This is an archived TF1 notebook. These are configured\n",
"to run in TF2's \n",
"[compatbility mode](https://www.tensorflow.org/guide/migrate)\n",
"[compatibility mode](https://www.tensorflow.org/guide/migrate)\n",
"but will run in TF1 as well. To use TF1 in Colab, use the\n",
"[%tensorflow_version 1.x](https://colab.research.google.com/notebooks/tensorflow_version.ipynb)\n",
"magic."
Expand Down
4 changes: 2 additions & 2 deletions site/en/r1/guide/distribute_strategy.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"source": [
"> Note: This is an archived TF1 notebook. These are configured\n",
"to run in TF2's \n",
"[compatbility mode](https://www.tensorflow.org/guide/migrate)\n",
"[compatibility mode](https://www.tensorflow.org/guide/migrate)\n",
"but will run in TF1 as well. To use TF1 in Colab, use the\n",
"[%tensorflow_version 1.x](https://colab.research.google.com/notebooks/tensorflow_version.ipynb)\n",
"magic."
Expand Down Expand Up @@ -223,7 +223,7 @@
"id": "KY1nJHNkMl7b"
},
"source": [
"This will create a `CentralStorageStrategy` instance which will use all visible GPUs and CPU. Update to variables on replicas will be aggragated before being applied to variables."
"This will create a `CentralStorageStrategy` instance which will use all visible GPUs and CPU. Update to variables on replicas will be aggregated before being applied to variables."
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion site/en/r1/guide/eager.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"source": [
"> Note: This is an archived TF1 notebook. These are configured\n",
"to run in TF2's \n",
"[compatbility mode](https://www.tensorflow.org/guide/migrate)\n",
"[compatibility mode](https://www.tensorflow.org/guide/migrate)\n",
"but will run in TF1 as well. To use TF1 in Colab, use the\n",
"[%tensorflow_version 1.x](https://colab.research.google.com/notebooks/tensorflow_version.ipynb)\n",
"magic."
Expand Down
2 changes: 1 addition & 1 deletion site/en/r1/guide/keras.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"source": [
"> Note: This is an archived TF1 notebook. These are configured\n",
"to run in TF2's \n",
"[compatbility mode](https://www.tensorflow.org/guide/migrate)\n",
"[compatibility mode](https://www.tensorflow.org/guide/migrate)\n",
"but will run in TF1 as well. To use TF1 in Colab, use the\n",
"[%tensorflow_version 1.x](https://colab.research.google.com/notebooks/tensorflow_version.ipynb)\n",
"magic."
Expand Down
4 changes: 2 additions & 2 deletions site/en/r1/guide/ragged_tensors.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"source": [
"> Note: This is an archived TF1 notebook. These are configured\n",
"to run in TF2's \n",
"[compatbility mode](https://www.tensorflow.org/guide/migrate)\n",
"[compatibility mode](https://www.tensorflow.org/guide/migrate)\n",
"but will run in TF1 as well. To use TF1 in Colab, use the\n",
"[%tensorflow_version 1.x](https://colab.research.google.com/notebooks/tensorflow_version.ipynb)\n",
"magic."
Expand Down Expand Up @@ -1010,7 +1010,7 @@
" `tf.RaggedTensor.values`\n",
" and\n",
" `tf.RaggedTensor.row_splits`\n",
" properties, or row-paritioning methods such as `tf.RaggedTensor.row_lengths()`\n",
" properties, or row-partitioning methods such as `tf.RaggedTensor.row_lengths()`\n",
" and `tf.RaggedTensor.value_rowids()`."
]
},
Expand Down
2 changes: 1 addition & 1 deletion site/en/r1/tutorials/_index.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"source": [
"> Note: This is an archived TF1 notebook. These are configured\n",
"to run in TF2's \n",
"[compatbility mode](https://www.tensorflow.org/guide/migrate)\n",
"[compatibility mode](https://www.tensorflow.org/guide/migrate)\n",
"but will run in TF1 as well. To use TF1 in Colab, use the\n",
"[%tensorflow_version 1.x](https://colab.research.google.com/notebooks/tensorflow_version.ipynb)\n",
"magic."
Expand Down
4 changes: 2 additions & 2 deletions site/en/r1/tutorials/distribute/keras.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"source": [
"> Note: This is an archived TF1 notebook. These are configured\n",
"to run in TF2's \n",
"[compatbility mode](https://www.tensorflow.org/guide/migrate)\n",
"[compatibility mode](https://www.tensorflow.org/guide/migrate)\n",
"but will run in TF1 as well. To use TF1 in Colab, use the\n",
"[%tensorflow_version 1.x](https://colab.research.google.com/notebooks/tensorflow_version.ipynb)\n",
"magic."
Expand Down Expand Up @@ -345,7 +345,7 @@
"source": [
"The callbacks used here are:\n",
"\n",
"* *Tensorboard*: This callback writes a log for Tensorboard which allows you to visualize the graphs.\n",
"* *TensorBoard*: This callback writes a log for TensorBoard which allows you to visualize the graphs.\n",
"* *Model Checkpoint*: This callback saves the model after every epoch.\n",
"* *Learning Rate Scheduler*: Using this callback, you can schedule the learning rate to change after every epoch/batch.\n",
"\n",
Expand Down
2 changes: 1 addition & 1 deletion site/en/r1/tutorials/distribute/tpu_custom_training.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"source": [
"> Note: This is an archived TF1 notebook. These are configured\n",
"to run in TF2's \n",
"[compatbility mode](https://www.tensorflow.org/guide/migrate)\n",
"[compatibility mode](https://www.tensorflow.org/guide/migrate)\n",
"but will run in TF1 as well. To use TF1 in Colab, use the\n",
"[%tensorflow_version 1.x](https://colab.research.google.com/notebooks/tensorflow_version.ipynb)\n",
"magic."
Expand Down
2 changes: 1 addition & 1 deletion site/en/r1/tutorials/distribute/training_loops.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"source": [
"> Note: This is an archived TF1 notebook. These are configured\n",
"to run in TF2's \n",
"[compatbility mode](https://www.tensorflow.org/guide/migrate)\n",
"[compatibility mode](https://www.tensorflow.org/guide/migrate)\n",
"but will run in TF1 as well. To use TF1 in Colab, use the\n",
"[%tensorflow_version 1.x](https://colab.research.google.com/notebooks/tensorflow_version.ipynb)\n",
"magic."
Expand Down
2 changes: 1 addition & 1 deletion site/en/r1/tutorials/eager/automatic_differentiation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"source": [
"> Note: This is an archived TF1 notebook. These are configured\n",
"to run in TF2's \n",
"[compatbility mode](https://www.tensorflow.org/guide/migrate)\n",
"[compatibility mode](https://www.tensorflow.org/guide/migrate)\n",
"but will run in TF1 as well. To use TF1 in Colab, use the\n",
"[%tensorflow_version 1.x](https://colab.research.google.com/notebooks/tensorflow_version.ipynb)\n",
"magic."
Expand Down
2 changes: 1 addition & 1 deletion site/en/r1/tutorials/eager/custom_layers.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"source": [
"> Note: This is an archived TF1 notebook. These are configured\n",
"to run in TF2's \n",
"[compatbility mode](https://www.tensorflow.org/guide/migrate)\n",
"[compatibility mode](https://www.tensorflow.org/guide/migrate)\n",
"but will run in TF1 as well. To use TF1 in Colab, use the\n",
"[%tensorflow_version 1.x](https://colab.research.google.com/notebooks/tensorflow_version.ipynb)\n",
"magic."
Expand Down
Loading

0 comments on commit 72732a6

Please sign in to comment.