Skip to content

Commit

Permalink
Introduction filename correction (#1239)
Browse files Browse the repository at this point in the history
* intro file name fix
  • Loading branch information
jeswan authored Nov 24, 2020
1 parent f340d04 commit 711c6c8
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 19 deletions.
20 changes: 10 additions & 10 deletions guides/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Also check out our [Examples](../examples) to see `jiant` in action.

If you don't know what to read, why not read our [In-Depth Introduction to Jiant](general/in_depth_into.md)?
If you don't know what to read, why not read our [In-Depth Introduction to Jiant](general/in_depth_intro.md)?

Contents:

Expand All @@ -17,24 +17,24 @@ Contents:

## Tutorials

These are quick tutorials that demonstrate `jiant` usage.
These are quick tutorials that demonstrate `jiant` usage.

* [Quick Start Guide — Using the "Simple" CLI](tutorials/quick_start_simple.md): A simple `jiant` training run in bash, using the "Simple" CLI
* [Quick Start Guide — Using the "Main" CLI](tutorials/quick_start_main.md): A simple `jiant` training run in bash, using the "Main" CLI

The "Simple" API provides a single command-line script for training and evaluating models on tasks, while the "Main" API offers more flexibilty by breaking the workflow down into discrete steps (downloading the model, tokenization & caching, writing a fully specific run-configuration, and finally running the experiment). Both interfaces use the same models and task implementations uner the hood.
The "Simple" API provides a single command-line script for training and evaluating models on tasks, while the "Main" API offers more flexibilty by breaking the workflow down into discrete steps (downloading the model, tokenization & caching, writing a fully specific run-configuration, and finally running the experiment). Both interfaces use the same models and task implementations uner the hood.


## General

These are general guides to `jiant`'s design and components. Refer to these if you have questions about parts of `jiant`:

* [In-Depth Introduction to Jiant](general/in_depth_into.md): Learn about `jiant` in greater detail
* [`jiant`'s models](general/in_depth_into.md#jiants-models)
* [`jiant`'s tasks](general/in_depth_into.md#jiants-tasks)
* [`Runner`s and `Metarunner`s](general/in_depth_into.md#runners-and-metarunners)
* [Step-by-step through `jiant`'s pipeline](general/in_depth_into.md#step-by-step-through-jiants-pipeline)
* [In-Depth Introduction to Jiant](general/in_depth_intro.md): Learn about `jiant` in greater detail
* [`jiant`'s models](general/in_depth_intro.md#jiants-models)
* [`jiant`'s tasks](general/in_depth_intro.md#jiants-tasks)
* [`Runner`s and `Metarunner`s](general/in_depth_intro.md#runners-and-metarunners)
* [Step-by-step through `jiant`'s pipeline](general/in_depth_intro.md#step-by-step-through-jiants-pipeline)

## Running benchmarks

These are guides to running common NLP benchmarks using `jiant`:
Expand All @@ -56,7 +56,7 @@ These are notes on the tasks supported in `jiant`:

* [List of supported tasks in `jiant`](tasks/supported_tasks.md)
* [Task-specific notes](tasks/task_specific.md): Learn about quirks/caveats about specific tasks
* [Adding Tasks](tasks/adding_tasks.md): Guide on adding a task to `jiant`
* [Adding Tasks](tasks/adding_tasks.md): Guide on adding a task to `jiant`

## Papers / Projects

Expand Down
File renamed without changes.
11 changes: 7 additions & 4 deletions guides/tutorials/quick_start_main.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ TASK=rte
```

Neither of these environment variables are read directly in Python, but simply used to make our bash commands more succinct. This also writes the intermediate and output files in our recommended folder organization.

1. We'll get the data using `jiant`'s download script
```bash
python jiant/scripts/download_data/runscript.py \
Expand All @@ -41,9 +41,9 @@ python jiant/proj/main/tokenize_and_cache.py \
--phases train,val \
--max_seq_length 256 \
--smart_truncate
```
```

4. Next, we write a [run-config](../general/in_depth_into.md#write-run-config). This writes a JSON file that specifies some configuration for our run - it's pretty simple now, but will be much more meaningful when running more complex multitasking experiments.
4. Next, we write a [run-config](../general/in_depth_intro.md#write-run-config). This writes a JSON file that specifies some configuration for our run - it's pretty simple now, but will be much more meaningful when running more complex multitasking experiments.
```bash
python jiant/proj/main/scripts/configurator.py \
SingleTaskConfigurator \
Expand Down Expand Up @@ -95,12 +95,15 @@ python jiant/proj/main/runscript.py \
...
...
--save_checkpoint_every_steps 500 \
--delete_checkpoint_if_done
```

This will save a checkpoint to disk every 500 training steps. The checkpoint will be saved to a `checkpoint.p` file. If the process gets killed, you can rerun the exact same command and it will continue training from the latest checkpoint.

Note that checkpoints are for resuming training, not for saving snapshots of model weights at different points in training. Checkpoints also include additional run metadata, as well as the optimizer states. To save regular snapshots of model weights, see [Model Snapshots](#model-snapshots)

We also set the `delete_checkpoint_if_done` flag to delete the checkpoint after training is complete.

### Model Snapshots

To save snapshots of model weights at regular intervals, use the `--save_every_steps` argument. For example:
Expand All @@ -113,7 +116,7 @@ will save a pickle of model weights every 500 training steps.

### Early Stopping

To do early stopping, we can perform validation evaluation at regular intervals over the course of training, and select the best model weights based on validation performance. For expedience, we often do not want to evaluate on the whole validation set, but only a subset. To do early stopping, use the following arguments as an example:
To do early stopping, we can perform validation evaluation at regular intervals over the course of training, and select the best model weights based on validation performance. For expedience, we often do not want to evaluate on the whole validation set, but only a subset. To do early stopping, use the following arguments as an example:

```
--eval_every_steps 1000
Expand Down
10 changes: 5 additions & 5 deletions guides/tutorials/quick_start_simple.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ First, let us assume that we will be working with the following working director
EXP_DIR=/path/to/exp
```

For this training example we'll use the RTE task from GLUE, and the RoBERTa-base model.
For this training example we'll use the RTE task from GLUE, and the RoBERTa-base model.

1. We'll get the data using `jiant`'s download script
```bash
Expand All @@ -36,7 +36,7 @@ python jiant/proj/simple/runscript.py \
--do_save
```

The "Simple" CLI subsumes several steps under the hood, including downloading the `roberta-base` model, tokenizing and caching the data, writing a [run-configuration](../general/in_depth_into.md#write-run-config), and performing the training.
The "Simple" CLI subsumes several steps under the hood, including downloading the `roberta-base` model, tokenizing and caching the data, writing a [run-configuration](../general/in_depth_intro.md#write-run-config), and performing the training.


## Additional Options
Expand All @@ -51,7 +51,7 @@ python jiant/proj/simple/runscript.py \
--do_save
```

This will save two sets of model weights: `last_model.p` will the the model weights at the end of training, while `best_model.p` will be the weights which achieves the best validation score on the evaluation subset (see: [Early Stopping](#early-stopping)). If you only one to save one or the other, use `--do_save_last` or `--do_save_best`.
This will save two sets of model weights: `last_model.p` will the the model weights at the end of training, while `best_model.p` will be the weights which achieves the best validation score on the evaluation subset (see: [Early Stopping](#early-stopping)). If you only one to save one or the other, use `--do_save_last` or `--do_save_best`.

### Checkpointing

Expand All @@ -70,7 +70,7 @@ This will save a checkpoint to disk every 500 training steps. The checkpoint wil

Note that checkpoints are for resuming training, not for saving snapshots of model weights at different points in training. Checkpoints also include additional run metadata, as well as the optimizer states. To save regular snapshots of model weights, see [Model Snapshots](#model-snapshots)

We also set the `delete_checkpoint_if_done` flag to delete the checkpoint after training is complete.
We also set the `delete_checkpoint_if_done` flag to delete the checkpoint after training is complete.

### Model Snapshots

Expand All @@ -84,7 +84,7 @@ will save a pickle of model weights every 500 training steps.

### Early Stopping

To do early stopping, we can perform validation evaluation at regular intervals over the course of training, and select the best model weights based on validation performance. For expedience, we often do not want to evaluate on the whole validation set, but only a subset. To do early stopping, use the following arguments as an example:
To do early stopping, we can perform validation evaluation at regular intervals over the course of training, and select the best model weights based on validation performance. For expedience, we often do not want to evaluate on the whole validation set, but only a subset. To do early stopping, use the following arguments as an example:

```
--eval_every_steps 1000
Expand Down

0 comments on commit 711c6c8

Please sign in to comment.