Update CityLearn.py
Browse files- CityLearn.py +10 -45
CityLearn.py
CHANGED
@@ -3,24 +3,17 @@ import datasets
|
|
3 |
import numpy as np
|
4 |
|
5 |
_DESCRIPTION = """The dataset consists of tuples of (observations, actions, rewards, dones) sampled by agents
|
6 |
-
interacting with the CityLearn 2022 Phase 1 environment"""
|
7 |
|
8 |
_BASE_URL = "https://huggingface.co/datasets/TobiTob/CityLearn/resolve/main"
|
9 |
_URLS = {
|
10 |
-
"s_test": f"{_BASE_URL}/s_test.pkl",
|
11 |
-
"s_week": f"{_BASE_URL}/s_week.pkl",
|
12 |
-
"s_month": f"{_BASE_URL}/s_month.pkl",
|
13 |
-
"s_random": f"{_BASE_URL}/s_random.pkl",
|
14 |
-
"s_random2": f"{_BASE_URL}/s_random2.pkl",
|
15 |
-
"s_random3": f"{_BASE_URL}/s_random3.pkl",
|
16 |
-
"s_random4": f"{_BASE_URL}/s_random4.pkl",
|
17 |
"random_230": f"{_BASE_URL}/random_230x5x38.pkl",
|
18 |
"f_230": f"{_BASE_URL}/f_230x5x38.pkl",
|
19 |
"f_50": f"{_BASE_URL}/f_50x5x1750.pkl",
|
20 |
"f_24": f"{_BASE_URL}/f_24x5x364.pkl",
|
21 |
"fr_24": f"{_BASE_URL}/fr_24x5x364.pkl",
|
22 |
"fn_24": f"{_BASE_URL}/fn_24x5x3649.pkl",
|
23 |
-
"
|
24 |
"rb_24": f"{_BASE_URL}/rb_24x5x364.pkl",
|
25 |
"rb_50": f"{_BASE_URL}/rb_50x5x175.pkl",
|
26 |
"rb_108": f"{_BASE_URL}/rb_108x5x81.pkl",
|
@@ -37,61 +30,33 @@ class DecisionTransformerCityLearnDataset(datasets.GeneratorBasedBuilder):
|
|
37 |
# You will be able to load one configuration in the following list with
|
38 |
# data = datasets.load_dataset('TobiTob/CityLearn', 'data_name')
|
39 |
BUILDER_CONFIGS = [
|
40 |
-
datasets.BuilderConfig(
|
41 |
-
name="s_test",
|
42 |
-
description="Small dataset sampled from an expert policy in CityLearn environment. Data size 10x8",
|
43 |
-
),
|
44 |
-
datasets.BuilderConfig(
|
45 |
-
name="s_week",
|
46 |
-
description="Data sampled from an expert policy in CityLearn environment. Data size 260x168",
|
47 |
-
),
|
48 |
-
datasets.BuilderConfig(
|
49 |
-
name="s_month",
|
50 |
-
description="Data sampled from an expert policy in CityLearn environment. Data size 60x720",
|
51 |
-
),
|
52 |
-
datasets.BuilderConfig(
|
53 |
-
name="s_random",
|
54 |
-
description="Random environment interactions in CityLearn environment. Data size 950x461",
|
55 |
-
),
|
56 |
-
datasets.BuilderConfig(
|
57 |
-
name="s_random2",
|
58 |
-
description="Random environment interactions in CityLearn environment. Data size 43795x10",
|
59 |
-
),
|
60 |
-
datasets.BuilderConfig(
|
61 |
-
name="s_random3",
|
62 |
-
description="Random environment interactions in CityLearn environment. Data size 23050x19",
|
63 |
-
),
|
64 |
-
datasets.BuilderConfig(
|
65 |
-
name="s_random4",
|
66 |
-
description="Random environment interactions in CityLearn environment. Data size 437950x1",
|
67 |
-
),
|
68 |
datasets.BuilderConfig(
|
69 |
name="random_230",
|
70 |
-
description="Random environment interactions
|
71 |
),
|
72 |
datasets.BuilderConfig(
|
73 |
name="f_230",
|
74 |
-
description="Data sampled from an expert policy
|
75 |
),
|
76 |
datasets.BuilderConfig(
|
77 |
name="f_50",
|
78 |
-
description="Data sampled from an expert policy
|
79 |
),
|
80 |
datasets.BuilderConfig(
|
81 |
name="f_24",
|
82 |
-
description="Data sampled from an expert policy
|
83 |
),
|
84 |
datasets.BuilderConfig(
|
85 |
name="fr_24",
|
86 |
-
description="Data sampled from an expert policy
|
87 |
),
|
88 |
datasets.BuilderConfig(
|
89 |
name="fn_24",
|
90 |
-
description="Data sampled from an expert policy
|
91 |
),
|
92 |
datasets.BuilderConfig(
|
93 |
-
name="
|
94 |
-
description="Data sampled from an expert policy
|
95 |
),
|
96 |
datasets.BuilderConfig(
|
97 |
name="rb_24",
|
|
|
3 |
import numpy as np
|
4 |
|
5 |
_DESCRIPTION = """The dataset consists of tuples of (observations, actions, rewards, dones) sampled by agents
|
6 |
+
interacting with the CityLearn 2022 Phase 1 environment (only first 5 buildings)"""
|
7 |
|
8 |
_BASE_URL = "https://huggingface.co/datasets/TobiTob/CityLearn/resolve/main"
|
9 |
_URLS = {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
"random_230": f"{_BASE_URL}/random_230x5x38.pkl",
|
11 |
"f_230": f"{_BASE_URL}/f_230x5x38.pkl",
|
12 |
"f_50": f"{_BASE_URL}/f_50x5x1750.pkl",
|
13 |
"f_24": f"{_BASE_URL}/f_24x5x364.pkl",
|
14 |
"fr_24": f"{_BASE_URL}/fr_24x5x364.pkl",
|
15 |
"fn_24": f"{_BASE_URL}/fn_24x5x3649.pkl",
|
16 |
+
"fn_230": f"{_BASE_URL}/fnn_230x5x380.pkl",
|
17 |
"rb_24": f"{_BASE_URL}/rb_24x5x364.pkl",
|
18 |
"rb_50": f"{_BASE_URL}/rb_50x5x175.pkl",
|
19 |
"rb_108": f"{_BASE_URL}/rb_108x5x81.pkl",
|
|
|
30 |
# You will be able to load one configuration in the following list with
|
31 |
# data = datasets.load_dataset('TobiTob/CityLearn', 'data_name')
|
32 |
BUILDER_CONFIGS = [
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
datasets.BuilderConfig(
|
34 |
name="random_230",
|
35 |
+
description="Random environment interactions. Sequence length = 230, Buildings = 5, Episodes = 1 ",
|
36 |
),
|
37 |
datasets.BuilderConfig(
|
38 |
name="f_230",
|
39 |
+
description="Data sampled from an expert LSTM policy. Sequence length = 230, Buildings = 5, Episodes = 1 ",
|
40 |
),
|
41 |
datasets.BuilderConfig(
|
42 |
name="f_50",
|
43 |
+
description="Data sampled from an expert LSTM policy with 10 episodes of repetition. Sequence length = 50, Buildings = 5, Episodes = 10 ",
|
44 |
),
|
45 |
datasets.BuilderConfig(
|
46 |
name="f_24",
|
47 |
+
description="Data sampled from an expert LSTM policy. Used the old reward function. Sequence length = 24, Buildings = 5, Episodes = 1 ",
|
48 |
),
|
49 |
datasets.BuilderConfig(
|
50 |
name="fr_24",
|
51 |
+
description="Data sampled from an expert LSTM policy. Used the new reward function. Sequence length = 24, Buildings = 5, Episodes = 1 ",
|
52 |
),
|
53 |
datasets.BuilderConfig(
|
54 |
name="fn_24",
|
55 |
+
description="Data sampled from an expert LSTM policy, extended with noise. Sequence length = 24, Buildings = 5, Episodes = 10 ",
|
56 |
),
|
57 |
datasets.BuilderConfig(
|
58 |
+
name="fn_230",
|
59 |
+
description="Data sampled from an expert LSTM policy, extended with noise. Sequence length = 230, Buildings = 5, Episodes = 10 ",
|
60 |
),
|
61 |
datasets.BuilderConfig(
|
62 |
name="rb_24",
|