Skip to content

Commit e5443b0

Browse files
committed
Added examples instructions and fixed notebook typos
1 parent d8abfd5 commit e5443b0

File tree

3 files changed

+118
-240
lines changed

3 files changed

+118
-240
lines changed

examples/README.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Running the examples
2+
3+
In this folder, we provide example scripts on how to use TSL for running
4+
consistent and reproducible experiments on neural spatiotemporal forecasting
5+
and imputation.
6+
7+
The experiment code and its configuration are handled by the [`Experiment`](https://torch-spatiotemporal.readthedocs.io/en/latest/modules/experiment.html)
8+
object in `tsl.experiment`, which makes use of [Hydra](https://hydra.cc/) as a
9+
configuration manager. Please refer to [Hydra's documentation](https://hydra.cc/docs/intro/)
10+
for more usage information.
11+
12+
In both subfolders, you will find an example script and a `config` directory.
13+
We now show an example of how to launch a traffic forecasting experiment (the
14+
same procedure applies to the imputation experiment).
15+
16+
Running a forecasting experiment using one of the baseline models on a provided
17+
benchmark dataset is as simple as that:
18+
19+
```bash
20+
python forecasting/run_traffic_experiment.py config=dcrnn dataset.name=la
21+
```
22+
23+
Under the hood, we are telling the program to run the traffic experiment using
24+
the `config/traffic/dcrnn.yaml` config, which is a particular instance of the
25+
`config/traffic/default.yaml` config. In practice, any parameter not defined in
26+
the primary `dcrnn.yaml` config file is inherited from the fallback config
27+
`default.yaml`.
28+
29+
Note that in this latter config, the rows
30+
```yaml
31+
dataset:
32+
name: ???
33+
```
34+
indicate that the name of the dataset is required in order to run the
35+
experiment. By passing as argument `dataset.name=la` we run the forecasting
36+
experiment on the [MetrLA](https://torch-spatiotemporal.readthedocs.io/en/latest/modules/datasets_in_tsl.html#tsl.datasets.MetrLA)
37+
dataset.
38+
39+
Check the code in the script file to see other possible options for the
40+
configuration arguments!

examples/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)