You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/source/get_started/quick_start.rst
+41-3Lines changed: 41 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,10 +9,46 @@ We use the [Taxi]_ dataset as an example to show how to use ``EasyTPP`` to train
9
9
Download Dataset
10
10
===================
11
11
12
-
The Taxi dataset we used is preprocessed by `HYPRO <https://github.com/iLampard/hypro_tpp>`_ . You can download this dataset `here <https://drive.google.com/drive/folders/1vNX2gFuGfhoh-vngoebaQlj2-ZIZMiBo>`_.
13
12
14
13
15
-
Create the dir to save the pkl files.
14
+
The Taxi dataset we used is preprocessed by `HYPRO <https://github.com/iLampard/hypro_tpp>`_ . You can either download the dataset (in pickle) from Google Drive `here <https://drive.google.com/drive/folders/1vNX2gFuGfhoh-vngoebaQlj2-ZIZMiBo>`_ or the dataset (in json) from `HuggingFace <https://huggingface.co/easytpp>`_.
15
+
16
+
17
+
Note that if the data sources are pickle files, we need to write the data config (in `Example Config <https://github.com/ant-research/EasyTemporalPointProcess/blob/main/examples/configs/experiment_config.yaml>`_) in the following way
18
+
19
+
.. code-block:: yaml
20
+
21
+
data:
22
+
taxi:
23
+
data_format: pickle
24
+
train_dir: ./data/taxi/train.pkl
25
+
valid_dir: ./data/taxi/dev.pkl
26
+
test_dir: ./data/taxi/test.pkl
27
+
28
+
If we choose to directly load from HuggingFace, we can put it this way:
29
+
30
+
.. code-block:: yaml
31
+
32
+
data:
33
+
taxi:
34
+
data_format: json
35
+
train_dir: easytpp/taxi
36
+
valid_dir: easytpp/taxi
37
+
test_dir: easytpp/taxi
38
+
39
+
40
+
Meanwhile, it is also feasible to put the local directory of json files downloaded from HuggingFace in the config:
41
+
42
+
.. code-block:: yaml
43
+
44
+
data:
45
+
taxi:
46
+
data_format: json
47
+
train_dir: ./data/taxi/train.json
48
+
valid_dir: ./data/taxi/dev.json
49
+
test_dir: ./data/taxi/test.json
50
+
51
+
16
52
17
53
18
54
Setup the configuration file
@@ -21,12 +57,14 @@ Setup the configuration file
21
57
We provide a preset config file in `Example Config <https://github.com/ant-research/EasyTemporalPointProcess/blob/main/examples/configs/experiment_config.yaml>`_. The details of the configuration can be found in `Training Pipeline <../user_guide/run_train_pipeline.html>`_.
22
58
23
59
60
+
61
+
24
62
Train the Model
25
63
=========================
26
64
27
65
At this stage we need to write a script to run the training pipeline. There is a preset script `train_nhp.py <https://github.com/ant-research/EasyTemporalPointProcess/blob/main/examples/train_nhp.py>`_ and one can simply copy it.
28
66
29
-
After the setup of data, config and running script, the directory structure is as follows:
67
+
Taking the pickle data source for example, after the setup of data, config and running script, the directory structure is as follows:
0 commit comments