Skip to content

Commit 79cca03

Browse files
committed
fix back
1 parent a637b1e commit 79cca03

File tree

3 files changed

+133
-136
lines changed

3 files changed

+133
-136
lines changed
Lines changed: 130 additions & 130 deletions
Original file line numberDiff line numberDiff line change
@@ -1,137 +1,137 @@
11
# Backtest configs for the 27 "zero-shot" datasets.
22
# These datasets were not seen by Chronos models during training.
3-
- name: monash_traffic
4-
hf_repo: autogluon/chronos_datasets
5-
offset: -24
6-
prediction_length: 24
7-
num_rolls: 1
8-
- name: monash_australian_electricity
9-
hf_repo: autogluon/chronos_datasets
10-
offset: -48
11-
prediction_length: 48
12-
num_rolls: 1
13-
- name: ercot
14-
hf_repo: autogluon/chronos_datasets
15-
offset: -24
16-
prediction_length: 24
17-
num_rolls: 1
18-
- name: ETTm
19-
hf_repo: autogluon/chronos_datasets_extra
20-
offset: -96
21-
prediction_length: 24
22-
num_rolls: 1
23-
- name: ETTh
24-
hf_repo: autogluon/chronos_datasets_extra
25-
offset: -24
26-
prediction_length: 24
27-
num_rolls: 1
28-
- name: exchange_rate
29-
hf_repo: autogluon/chronos_datasets
30-
offset: -30
31-
prediction_length: 30
32-
num_rolls: 1
33-
- name: nn5
34-
hf_repo: autogluon/chronos_datasets
35-
offset: -56
36-
prediction_length: 56
37-
num_rolls: 1
38-
- name: monash_nn5_weekly
39-
hf_repo: autogluon/chronos_datasets
40-
offset: -8
41-
prediction_length: 8
42-
num_rolls: 1
43-
- name: monash_weather
44-
hf_repo: autogluon/chronos_datasets
45-
offset: -30
46-
prediction_length: 30
47-
num_rolls: 1
48-
- name: monash_covid_deaths
49-
hf_repo: autogluon/chronos_datasets
50-
offset: -30
51-
prediction_length: 30
52-
num_rolls: 1
53-
- name: monash_fred_md
54-
hf_repo: autogluon/chronos_datasets
55-
offset: -12
56-
prediction_length: 12
57-
num_rolls: 1
58-
- name: m4_quarterly
59-
hf_repo: autogluon/chronos_datasets
60-
offset: -8
61-
prediction_length: 8
62-
num_rolls: 1
63-
- name: m4_yearly
64-
hf_repo: autogluon/chronos_datasets
65-
offset: -6
66-
prediction_length: 6
67-
num_rolls: 1
68-
- name: dominick
69-
hf_repo: autogluon/chronos_datasets
70-
offset: -8
71-
prediction_length: 8
72-
num_rolls: 1
73-
- name: m5
74-
hf_repo: autogluon/chronos_datasets
75-
offset: -28
76-
prediction_length: 28
77-
num_rolls: 1
78-
- name: monash_tourism_monthly
79-
hf_repo: autogluon/chronos_datasets
80-
offset: -24
81-
prediction_length: 24
82-
num_rolls: 1
83-
- name: monash_tourism_quarterly
84-
hf_repo: autogluon/chronos_datasets
85-
offset: -8
86-
prediction_length: 8
87-
num_rolls: 1
88-
- name: monash_tourism_yearly
89-
hf_repo: autogluon/chronos_datasets
90-
offset: -4
91-
prediction_length: 4
92-
num_rolls: 1
93-
- name: monash_car_parts
94-
hf_repo: autogluon/chronos_datasets
95-
offset: -12
96-
prediction_length: 12
97-
num_rolls: 1
3+
# - name: monash_traffic
4+
# hf_repo: autogluon/chronos_datasets
5+
# offset: -24
6+
# prediction_length: 24
7+
# num_rolls: 1
8+
# - name: monash_australian_electricity
9+
# hf_repo: autogluon/chronos_datasets
10+
# offset: -48
11+
# prediction_length: 48
12+
# num_rolls: 1
13+
# - name: ercot
14+
# hf_repo: autogluon/chronos_datasets
15+
# offset: -24
16+
# prediction_length: 24
17+
# num_rolls: 1
18+
# - name: ETTm
19+
# hf_repo: autogluon/chronos_datasets_extra
20+
# offset: -96
21+
# prediction_length: 24
22+
# num_rolls: 1
23+
# - name: ETTh
24+
# hf_repo: autogluon/chronos_datasets_extra
25+
# offset: -24
26+
# prediction_length: 24
27+
# num_rolls: 1
28+
# - name: exchange_rate
29+
# hf_repo: autogluon/chronos_datasets
30+
# offset: -30
31+
# prediction_length: 30
32+
# num_rolls: 1
33+
# - name: nn5
34+
# hf_repo: autogluon/chronos_datasets
35+
# offset: -56
36+
# prediction_length: 56
37+
# num_rolls: 1
38+
# - name: monash_nn5_weekly
39+
# hf_repo: autogluon/chronos_datasets
40+
# offset: -8
41+
# prediction_length: 8
42+
# num_rolls: 1
43+
# - name: monash_weather
44+
# hf_repo: autogluon/chronos_datasets
45+
# offset: -30
46+
# prediction_length: 30
47+
# num_rolls: 1
48+
# - name: monash_covid_deaths
49+
# hf_repo: autogluon/chronos_datasets
50+
# offset: -30
51+
# prediction_length: 30
52+
# num_rolls: 1
53+
# - name: monash_fred_md
54+
# hf_repo: autogluon/chronos_datasets
55+
# offset: -12
56+
# prediction_length: 12
57+
# num_rolls: 1
58+
# - name: m4_quarterly
59+
# hf_repo: autogluon/chronos_datasets
60+
# offset: -8
61+
# prediction_length: 8
62+
# num_rolls: 1
63+
# - name: m4_yearly
64+
# hf_repo: autogluon/chronos_datasets
65+
# offset: -6
66+
# prediction_length: 6
67+
# num_rolls: 1
68+
# - name: dominick
69+
# hf_repo: autogluon/chronos_datasets
70+
# offset: -8
71+
# prediction_length: 8
72+
# num_rolls: 1
73+
# - name: m5
74+
# hf_repo: autogluon/chronos_datasets
75+
# offset: -28
76+
# prediction_length: 28
77+
# num_rolls: 1
78+
# - name: monash_tourism_monthly
79+
# hf_repo: autogluon/chronos_datasets
80+
# offset: -24
81+
# prediction_length: 24
82+
# num_rolls: 1
83+
# - name: monash_tourism_quarterly
84+
# hf_repo: autogluon/chronos_datasets
85+
# offset: -8
86+
# prediction_length: 8
87+
# num_rolls: 1
88+
# - name: monash_tourism_yearly
89+
# hf_repo: autogluon/chronos_datasets
90+
# offset: -4
91+
# prediction_length: 4
92+
# num_rolls: 1
93+
# - name: monash_car_parts
94+
# hf_repo: autogluon/chronos_datasets
95+
# offset: -12
96+
# prediction_length: 12
97+
# num_rolls: 1
9898
- name: monash_hospital
9999
hf_repo: autogluon/chronos_datasets
100100
offset: -12
101101
prediction_length: 12
102102
num_rolls: 1
103-
- name: monash_cif_2016
104-
hf_repo: autogluon/chronos_datasets
105-
offset: -12
106-
prediction_length: 12
107-
num_rolls: 1
108-
- name: monash_m1_yearly
109-
hf_repo: autogluon/chronos_datasets
110-
offset: -6
111-
prediction_length: 6
112-
num_rolls: 1
113-
- name: monash_m1_quarterly
114-
hf_repo: autogluon/chronos_datasets
115-
offset: -8
116-
prediction_length: 8
117-
num_rolls: 1
118-
- name: monash_m1_monthly
119-
hf_repo: autogluon/chronos_datasets
120-
offset: -18
121-
prediction_length: 18
122-
num_rolls: 1
123-
- name: monash_m3_monthly
124-
hf_repo: autogluon/chronos_datasets
125-
offset: -18
126-
prediction_length: 18
127-
num_rolls: 1
128-
- name: monash_m3_yearly
129-
hf_repo: autogluon/chronos_datasets
130-
offset: -6
131-
prediction_length: 6
132-
num_rolls: 1
133-
- name: monash_m3_quarterly
134-
hf_repo: autogluon/chronos_datasets
135-
offset: -8
136-
prediction_length: 8
137-
num_rolls: 1
103+
# - name: monash_cif_2016
104+
# hf_repo: autogluon/chronos_datasets
105+
# offset: -12
106+
# prediction_length: 12
107+
# num_rolls: 1
108+
# - name: monash_m1_yearly
109+
# hf_repo: autogluon/chronos_datasets
110+
# offset: -6
111+
# prediction_length: 6
112+
# num_rolls: 1
113+
# - name: monash_m1_quarterly
114+
# hf_repo: autogluon/chronos_datasets
115+
# offset: -8
116+
# prediction_length: 8
117+
# num_rolls: 1
118+
# - name: monash_m1_monthly
119+
# hf_repo: autogluon/chronos_datasets
120+
# offset: -18
121+
# prediction_length: 18
122+
# num_rolls: 1
123+
# - name: monash_m3_monthly
124+
# hf_repo: autogluon/chronos_datasets
125+
# offset: -18
126+
# prediction_length: 18
127+
# num_rolls: 1
128+
# - name: monash_m3_yearly
129+
# hf_repo: autogluon/chronos_datasets
130+
# offset: -6
131+
# prediction_length: 6
132+
# num_rolls: 1
133+
# - name: monash_m3_quarterly
134+
# hf_repo: autogluon/chronos_datasets
135+
# offset: -8
136+
# prediction_length: 8
137+
# num_rolls: 1

scripts/evaluation/evaluate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ def generate_sample_forecasts(
239239
# Generate forecast samples
240240
forecast_samples = []
241241
for batch in tqdm(batcher(test_data_input, batch_size=batch_size)):
242-
context = [torch.tensor(entry["target"], torch.float32) for entry in batch]
242+
context = [torch.tensor(entry["target"]) for entry in batch]
243243
forecast_samples.append(
244244
pipeline.predict(
245245
context,

src/chronos/chronos.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -371,13 +371,10 @@ def left_pad_and_stack_1D(tensors: List[torch.Tensor]) -> torch.Tensor:
371371
assert isinstance(c, torch.Tensor)
372372
assert c.ndim == 1
373373
padding = torch.full(
374-
size=(max_len - len(c),),
375-
fill_value=torch.nan,
376-
device=c.device,
377-
dtype=c.dtype,
374+
size=(max_len - len(c),), fill_value=torch.nan, device=c.device
378375
)
379376
padded.append(torch.concat((padding, c), dim=-1))
380-
return torch.stack(padded)
377+
return torch.stack(padded).to(tensors[0])
381378

382379

383380
@dataclass

0 commit comments

Comments
 (0)