Skip to content

Commit

Permalink
Fix broken URLs due to docs site refactor (mosaicml#2150)
Browse files Browse the repository at this point in the history
*  Change docs.mosaicml.com/en to docs.mosaicml.com/projects/composer/en
  • Loading branch information
bandish-shah authored Apr 19, 2023
1 parent 21e90ac commit 53e4ac0
Show file tree
Hide file tree
Showing 17 changed files with 135 additions and 135 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@

<h4><p align='center'>
<a href="https://www.mosaicml.com">[Website]</a>
- <a href="https://docs.mosaicml.com/en/stable/getting_started/installation.html">[Getting Started]</a>
- <a href="https://docs.mosaicml.com/">[Docs]</a>
- <a href="https://docs.mosaicml.com/en/stable/method_cards/methods_overview.html">[Methods]</a>
- <a href="https://docs.mosaicml.com/projects/composer/en/stable/getting_started/installation.html">[Getting Started]</a>
- <a href="https://docs.mosaicml.com/projects/composer/">[Docs]</a>
- <a href="https://docs.mosaicml.com/projects/composer/en/stable/method_cards/methods_overview.html">[Methods]</a>
- <a href="https://www.mosaicml.com/team">[We're Hiring!]</a>
</p></h4>

Expand All @@ -31,7 +31,7 @@
<a href="https://pepy.tech/project/mosaicml/">
<img alt="PyPi Downloads" src="https://static.pepy.tech/personalized-badge/mosaicml?period=month&units=international_system&left_color=grey&right_color=blue&left_text=Downloads/month">
</a>
<a href="https://docs.mosaicml.com/en/stable/">
<a href="https://docs.mosaicml.com/projects/composer/en/stable/">
<img alt="Documentation" src="https://readthedocs.org/projects/composer/badge/?version=stable">
</a>
<a href="https://join.slack.com/t/mosaicml-community/shared_invite/zt-w0tiddn9-WGTlRpfjcO9J5jyrMub1dg">
Expand Down Expand Up @@ -102,7 +102,7 @@ You can use Composer's speedup methods in two ways:

### Example: Functional API [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/mosaicml/composer/blob/dev/examples/functional_api.ipynb)

Integrate our speedup methods into your training loop with just a few lines of code, and see the results. Here we easily apply [BlurPool](https://docs.mosaicml.com/en/stable/method_cards/blurpool.html) and [SqueezeExcite](https://docs.mosaicml.com/en/stable/method_cards/squeeze_excite.html):
Integrate our speedup methods into your training loop with just a few lines of code, and see the results. Here we easily apply [BlurPool](https://docs.mosaicml.com/projects/composer/en/stable/method_cards/blurpool.html) and [SqueezeExcite](https://docs.mosaicml.com/projects/composer/en/stable/method_cards/squeeze_excite.html):

<!-- begin_example_1 --->
```python
Expand All @@ -119,7 +119,7 @@ cf.apply_squeeze_excite(my_model)
```
<!-- end_example_1 --->

For more examples, see the [Composer Functional API Colab notebook](https://colab.research.google.com/github/mosaicml/composer/blob/dev/examples/functional_api.ipynb) and [Functional API guide](https://docs.mosaicml.com/en/latest/functional_api.html).
For more examples, see the [Composer Functional API Colab notebook](https://colab.research.google.com/github/mosaicml/composer/blob/dev/examples/functional_api.ipynb) and [Functional API guide](https://docs.mosaicml.com/projects/composer/en/latest/functional_api.html).

### Example: Trainer [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/mosaicml/composer/blob/dev/examples/getting_started.ipynb)

Expand Down Expand Up @@ -167,23 +167,23 @@ trainer.fit()
```
<!-- end_example_2 -->

Composer's built-in [trainer](https://docs.mosaicml.com/en/stable/trainer/using_the_trainer.html) makes it easy to **add multiple speedup methods in a single line of code!**
Composer's built-in [trainer](https://docs.mosaicml.com/projects/composer/en/stable/trainer/using_the_trainer.html) makes it easy to **add multiple speedup methods in a single line of code!**
Trying out new methods or combinations of methods is as easy as changing a single list.

Here are some examples of methods available in Composer ([_see here for the full list_](https://docs.mosaicml.com/en/latest/trainer/algorithms.html)):
Here are some examples of methods available in Composer ([_see here for the full list_](https://docs.mosaicml.com/projects/composer/en/latest/trainer/algorithms.html)):

Name|Attribution|tl;dr|Example Benchmark|Speed Up*|
----|-----------|-----|---------|---------|
[Alibi](https://github.com/mosaicml/composer/tree/dev/composer/algorithms/alibi)|[Press et al, 2021](https://arxiv.org/abs/2108.12409)|Replace attention with AliBi.|GPT-2|1.5x
[BlurPool](https://github.com/mosaicml/composer/tree/dev/composer/algorithms/blurpool)|[Zhang, 2019](https://arxiv.org/abs/1904.11486)|Applies an anti-aliasing filter before every downsampling operation.|ResNet-101|1.2x
[ChannelsLast](https://github.com/mosaicml/composer/tree/dev/composer/algorithms/channels_last)|[PyTorch](https://pytorch.org/tutorials/intermediate/memory_format_tutorial.html)|Uses channels last memory format (NHWC).|ResNet-101|1.5x
[CutOut](https://docs.mosaicml.com/en/latest/method_cards/cutout.html)|[DeVries et al, 2017](https://arxiv.org/abs/1708.04552)|Randomly erases rectangular blocks from the image.|ResNet-101|1.2x
[CutOut](https://docs.mosaicml.com/projects/composer/en/latest/method_cards/cutout.html)|[DeVries et al, 2017](https://arxiv.org/abs/1708.04552)|Randomly erases rectangular blocks from the image.|ResNet-101|1.2x
[LabelSmoothing](https://github.com/mosaicml/composer/tree/dev/composer/algorithms/label_smoothing)|[Szegedy et al, 2015](https://arxiv.org/abs/1512.00567)|Smooths the labels with a uniform prior|ResNet-101|1.5x
[MixUp](https://github.com/mosaicml/composer/tree/dev/composer/algorithms/mixup)|[Zhang et al, 2017](https://arxiv.org/abs/1710.09412)|Blends pairs of examples and labels.|ResNet-101|1.5x
[RandAugment](https://github.com/mosaicml/composer/tree/dev/composer/algorithms/randaugment)|[Cubuk et al, 2020](https://openaccess.thecvf.com/content_CVPRW_2020/html/w40/Cubuk_Randaugment_Practical_Automated_Data_Augmentation_With_a_Reduced_Search_Space_CVPRW_2020_paper.html)|Applies a series of random augmentations to each image.|ResNet-101|1.3x
[SAM](https://github.com/mosaicml/composer/tree/dev/composer/algorithms/sam)|[Foret et al, 2021](https://arxiv.org/abs/2010.01412)|An optimization strategy that seeks flatter minima.|ResNet-101|1.4x
[SeqLengthWarmup](https://github.com/mosaicml/composer/tree/dev/composer/algorithms/seq_length_warmup)|[Li et al, 2021](https://arxiv.org/abs/2108.06084)|Progressively increase sequence length.|GPT-2|1.2x
[Stochastic Depth](https://docs.mosaicml.com/en/latest/method_cards/stochastic_depth.html)|[Huang et al, 2016](https://arxiv.org/abs/1603.09382)|Replaces a specified layer with a stochastic version that randomly drops the layer or samples during training|ResNet-101|1.1x
[Stochastic Depth](https://docs.mosaicml.com/projects/composer/en/latest/method_cards/stochastic_depth.html)|[Huang et al, 2016](https://arxiv.org/abs/1603.09382)|Replaces a specified layer with a stochastic version that randomly drops the layer or samples during training|ResNet-101|1.1x
<p align="right">* = time-to-train to the same quality as the baseline.</p>

## 🛠 Building Speedup Recipes
Expand Down
2 changes: 1 addition & 1 deletion composer/core/state.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ class State(Serializable):
eval_metrics (Dict[str, Dict[str, Metric]]): The current evaluation metrics, organized
by dataloader label and then by metric name. If not using an :class:`.Evaluator`,
the eval dataloader is labeled ``'eval'``. Otherwise, in the case of having multiple evaluation datasets,
the evaluator label is used. See the `Multiple Datasets Documentation <https://docs.mosaicml.com/en/stable/trainer/evaluation.html#multiple-datasets>`_
the evaluator label is used. See the `Multiple Datasets Documentation <https://docs.mosaicml.com/projects/composer/en/stable/trainer/evaluation.html#multiple-datasets>`_
for more information. ``eval_metrics`` will be deep-copied to ensure that each evaluator updates only its ``eval_metrics``.
For example:
Expand Down
2 changes: 1 addition & 1 deletion composer/models/resnet/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ ResNet family members are identified by their number of layers. Parameter count,
| ResNet-152 | 60.2M | TBA | TBA |


> **Note**: Please see the [CIFAR ResNet model card](https://docs.mosaicml.com/en/stable/model_cards/cifar_resnet.html#architecture) for the differences between CIFAR and ImageNet ResNets.
> **Note**: Please see the [CIFAR ResNet model card](https://docs.mosaicml.com/projects/composer/en/stable/model_cards/cifar_resnet.html#architecture) for the differences between CIFAR and ImageNet ResNets.
## Default Training Hyperparameters

Expand Down
12 changes: 6 additions & 6 deletions examples/TPU_Training_in_composer.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"Let's get started!\n",
"\n",
"[torch_xla]: https://github.com/pytorch/xla\n",
"[getting_started]: https://docs.mosaicml.com/en/stable/examples/getting_started.html"
"[getting_started]: https://docs.mosaicml.com/projects/composer/en/stable/examples/getting_started.html"
]
},
{
Expand Down Expand Up @@ -188,11 +188,11 @@
"\n",
"* Keep it custom with our [custom speedups][custom_speedups_tutorial] tutorial.\n",
"\n",
"[autograd]: https://docs.mosaicml.com/en/stable/examples/auto_microbatching.html\n",
"[autoresume]: https://docs.mosaicml.com/en/stable/examples/checkpoint_autoresume.html\n",
"[image_segmentation_tutorial]: https://docs.mosaicml.com/en/stable/examples/medical_image_segmentation.html\n",
"[huggingface_tutorial]: https://docs.mosaicml.com/en/stable/examples/huggingface_models.html\n",
"[custom_speedups_tutorial]: https://docs.mosaicml.com/en/stable/examples/custom_speedup_methods.html"
"[autograd]: https://docs.mosaicml.com/projects/composer/en/stable/examples/auto_microbatching.html\n",
"[autoresume]: https://docs.mosaicml.com/projects/composer/en/stable/examples/checkpoint_autoresume.html\n",
"[image_segmentation_tutorial]: https://docs.mosaicml.com/projects/composer/en/stable/examples/medical_image_segmentation.html\n",
"[huggingface_tutorial]: https://docs.mosaicml.com/projects/composer/en/stable/examples/huggingface_models.html\n",
"[custom_speedups_tutorial]: https://docs.mosaicml.com/projects/composer/en/stable/examples/custom_speedup_methods.html"
]
},
{
Expand Down
12 changes: 6 additions & 6 deletions examples/auto_microbatching.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"\n",
"Let's get started!\n",
"\n",
"[docs]: https://docs.mosaicml.com/en/stable/notes/auto_microbatching.html"
"[docs]: https://docs.mosaicml.com/projects/composer/en/stable/notes/auto_microbatching.html"
]
},
{
Expand Down Expand Up @@ -183,11 +183,11 @@
"\n",
"\n",
"\n",
"[docs]: https://docs.mosaicml.com/en/stable/notes/auto_microbatching.html\n",
"[autoresume]: https://docs.mosaicml.com/en/stable/examples/checkpoint_autoresume.html\n",
"[exporting]: https://docs.mosaicml.com/en/stable/examples/exporting_for_inference.html\n",
"[image_segmentation_tutorial]: https://docs.mosaicml.com/en/stable/examples/medical_image_segmentation.html\n",
"[huggingface_tutorial]: https://docs.mosaicml.com/en/stable/examples/huggingface_models.html"
"[docs]: https://docs.mosaicml.com/projects/composer/en/stable/notes/auto_microbatching.html\n",
"[autoresume]: https://docs.mosaicml.com/projects/composer/en/stable/examples/checkpoint_autoresume.html\n",
"[exporting]: https://docs.mosaicml.com/projects/composer/en/stable/examples/exporting_for_inference.html\n",
"[image_segmentation_tutorial]: https://docs.mosaicml.com/projects/composer/en/stable/examples/medical_image_segmentation.html\n",
"[huggingface_tutorial]: https://docs.mosaicml.com/projects/composer/en/stable/examples/huggingface_models.html"
]
},
{
Expand Down
12 changes: 6 additions & 6 deletions examples/checkpoint_autoresume.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
"\n",
"For a deeper look into the way autoresume works, check out our more in depth [notes][autoresume].\n",
"\n",
"[checkpointing]: https://docs.mosaicml.com/en/stable/trainer/checkpointing.html\n",
"[autoresume]: https://docs.mosaicml.com/en/stable/notes/resumption.html"
"[checkpointing]: https://docs.mosaicml.com/projects/composer/en/stable/trainer/checkpointing.html\n",
"[autoresume]: https://docs.mosaicml.com/projects/composer/en/stable/notes/resumption.html"
]
},
{
Expand Down Expand Up @@ -151,10 +151,10 @@
"\n",
"* Learn how to [train without local storage][no_local_storage_tutorial].\n",
"\n",
"[autograd]: https://docs.mosaicml.com/en/stable/examples/auto_microbatching.html\n",
"[autoresume]: https://docs.mosaicml.com/en/stable/notes/resumption.html\n",
"[image_segmentation_tutorial]: https://docs.mosaicml.com/en/stable/examples/medical_image_segmentation.html\n",
"[huggingface_tutorial]: https://docs.mosaicml.com/en/stable/examples/huggingface_models.html\n"
"[autograd]: https://docs.mosaicml.com/projects/composer/en/stable/examples/auto_microbatching.html\n",
"[autoresume]: https://docs.mosaicml.com/projects/composer/en/stable/notes/resumption.html\n",
"[image_segmentation_tutorial]: https://docs.mosaicml.com/projects/composer/en/stable/examples/medical_image_segmentation.html\n",
"[huggingface_tutorial]: https://docs.mosaicml.com/projects/composer/en/stable/examples/huggingface_models.html\n"
]
},
{
Expand Down
26 changes: 13 additions & 13 deletions examples/custom_speedup_methods.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"\n",
"We will see that getting a method working with Composer is not very different from getting it working with vanilla PyTorch. With just a couple extra steps we can use our algorithm while enjoying the flexibility and simplicity of Composer!\n",
"\n",
"[getting_started]: https://docs.mosaicml.com/en/stable/examples/getting_started.html"
"[getting_started]: https://docs.mosaicml.com/projects/composer/en/stable/examples/getting_started.html"
]
},
{
Expand Down Expand Up @@ -210,11 +210,11 @@
"### Implementing ColOut\n",
"\n",
"\n",
"For this tutorial, we'll look at how to implement one of the simpler speedup methods currently in our composer library: [ColOut](https://docs.mosaicml.com/en/stable/method_cards/colout.html). This method works on image data by dropping random rows and columns from the training images. This reduces the size of the training images, which reduces the time per training iteration and hopefully does not alter the semantic content of the image too much. Additionally, dropping a small fraction of random rows and columns can also slightly distort objects and perhaps provide a data augmentation effect.\n",
"For this tutorial, we'll look at how to implement one of the simpler speedup methods currently in our composer library: [ColOut](https://docs.mosaicml.com/projects/composer/en/stable/method_cards/colout.html). This method works on image data by dropping random rows and columns from the training images. This reduces the size of the training images, which reduces the time per training iteration and hopefully does not alter the semantic content of the image too much. Additionally, dropping a small fraction of random rows and columns can also slightly distort objects and perhaps provide a data augmentation effect.\n",
"\n",
"To start our implementation, we'll write a function to drop random rows and columns from a batch of input images. We'll assume that these are torch tensors and operate on a batch, rather than individual images, for simplicity here.\n",
"\n",
"[colout]: https://docs.mosaicml.com/en/stable/method_cards/colout.html"
"[colout]: https://docs.mosaicml.com/projects/composer/en/stable/method_cards/colout.html"
]
},
{
Expand Down Expand Up @@ -379,7 +379,7 @@
"source": [
"The training loop Composer uses provides multiple different locations where method code can be inserted and run. These are called events. Diagramatically, the training loop looks as follows:\n",
"\n",
"![Training Loop](https://storage.googleapis.com/docs.mosaicml.com/images/training_loop.png)"
"![Training Loop](https://storage.googleapis.com/docs.mosaicml.com/projects/composer/images/training_loop.png)"
]
},
{
Expand Down Expand Up @@ -686,11 +686,11 @@
"* [SelectiveBackprop][selectivebackprop] changes which samples are used to compute gradients.\n",
"* [SAM][sam] changes the optimizer used for training.\n",
"\n",
"[blurpool]: https://docs.mosaicml.com/en/stable/method_cards/blurpool.html\n",
"[layerfreezing]: https://docs.mosaicml.com/en/stable/method_cards/layer_freezing.html\n",
"[randaugment]: https://docs.mosaicml.com/en/stable/method_cards/randaugment.html\n",
"[selectivebackprop]: https://docs.mosaicml.com/en/stable/method_cards/selective_backprop.html\n",
"[sam]: https://docs.mosaicml.com/en/stable/method_cards/sam.html\n",
"[blurpool]: https://docs.mosaicml.com/projects/composer/en/stable/method_cards/blurpool.html\n",
"[layerfreezing]: https://docs.mosaicml.com/projects/composer/en/stable/method_cards/layer_freezing.html\n",
"[randaugment]: https://docs.mosaicml.com/projects/composer/en/stable/method_cards/randaugment.html\n",
"[selectivebackprop]: https://docs.mosaicml.com/projects/composer/en/stable/method_cards/selective_backprop.html\n",
"[sam]: https://docs.mosaicml.com/projects/composer/en/stable/method_cards/sam.html\n",
"\n",
"In addition, please continue to explore our tutorials! Here's a couple suggestions:\n",
"\n",
Expand All @@ -700,10 +700,10 @@
"\n",
"* A [transition guide][ptl_tutorial] for switching from PyTorch Lightening to Composer.\n",
"\n",
"[ptl_tutorial]: https://docs.mosaicml.com/en/stable/examples/migrate_from_ptl.html\n",
"[image_segmentation_tutorial]: https://docs.mosaicml.com/en/stable/examples/medical_image_segmentation.html\n",
"[huggingface_tutorial]: https://docs.mosaicml.com/en/stable/examples/huggingface_models.html\n",
"[early_stopping_tutorial]: https://docs.mosaicml.com/en/stable/examples/early_stopping.html"
"[ptl_tutorial]: https://docs.mosaicml.com/projects/composer/en/stable/examples/migrate_from_ptl.html\n",
"[image_segmentation_tutorial]: https://docs.mosaicml.com/projects/composer/en/stable/examples/medical_image_segmentation.html\n",
"[huggingface_tutorial]: https://docs.mosaicml.com/projects/composer/en/stable/examples/huggingface_models.html\n",
"[early_stopping_tutorial]: https://docs.mosaicml.com/projects/composer/en/stable/examples/early_stopping.html"
]
},
{
Expand Down
Loading

0 comments on commit 53e4ac0

Please sign in to comment.