Update CityLearn.py
Browse files- CityLearn.py +3 -22
CityLearn.py
CHANGED
|
@@ -14,20 +14,9 @@ _URLS = {
|
|
| 14 |
|
| 15 |
|
| 16 |
class DecisionTransformerCityLearnDataset(datasets.GeneratorBasedBuilder):
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
# This is an example of a dataset with multiple configurations.
|
| 21 |
-
# If you don't want/need to define several sub-sets in your dataset,
|
| 22 |
-
# just remove the BUILDER_CONFIG_CLASS and the BUILDER_CONFIGS attributes.
|
| 23 |
-
|
| 24 |
-
# If you need to make complex sub-parts in the datasets with configurable options
|
| 25 |
-
# You can create your own builder configuration class to store attribute, inheriting from datasets.BuilderConfig
|
| 26 |
-
# BUILDER_CONFIG_CLASS = MyBuilderConfig
|
| 27 |
-
|
| 28 |
-
# You will be able to load one or the other configurations in the following list with
|
| 29 |
-
# data = datasets.load_dataset('my_dataset', 'first_domain')
|
| 30 |
-
# data = datasets.load_dataset('my_dataset', 'second_domain')
|
| 31 |
BUILDER_CONFIGS = [
|
| 32 |
datasets.BuilderConfig(
|
| 33 |
name="s_test",
|
|
@@ -51,20 +40,12 @@ class DecisionTransformerCityLearnDataset(datasets.GeneratorBasedBuilder):
|
|
| 51 |
"actions": datasets.Sequence(datasets.Sequence(datasets.Value("float32"))),
|
| 52 |
"rewards": datasets.Sequence(datasets.Value("float32")),
|
| 53 |
"dones": datasets.Sequence(datasets.Value("bool")),
|
| 54 |
-
# These are the features of your dataset like images, labels ...
|
| 55 |
}
|
| 56 |
)
|
| 57 |
|
| 58 |
return datasets.DatasetInfo(
|
| 59 |
-
# This is the description that will appear on the datasets page.
|
| 60 |
description=_DESCRIPTION,
|
| 61 |
-
# This defines the different columns of the dataset and their types
|
| 62 |
-
# Here we define them above because they are different between the two configurations
|
| 63 |
features=features,
|
| 64 |
-
# If there's a common (input, target) tuple from the features, uncomment supervised_keys line below and
|
| 65 |
-
# specify them. They'll be used if as_supervised=True in builder.as_dataset.
|
| 66 |
-
# supervised_keys=("sentence", "label"),
|
| 67 |
-
# Homepage of the dataset for documentation
|
| 68 |
)
|
| 69 |
|
| 70 |
def _split_generators(self, dl_manager):
|
|
|
|
| 14 |
|
| 15 |
|
| 16 |
class DecisionTransformerCityLearnDataset(datasets.GeneratorBasedBuilder):
|
| 17 |
+
|
| 18 |
+
# You will be able to load one configuration in the following list with
|
| 19 |
+
# data = datasets.load_dataset('TobiTob/CityLearn', 'data_name')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
BUILDER_CONFIGS = [
|
| 21 |
datasets.BuilderConfig(
|
| 22 |
name="s_test",
|
|
|
|
| 40 |
"actions": datasets.Sequence(datasets.Sequence(datasets.Value("float32"))),
|
| 41 |
"rewards": datasets.Sequence(datasets.Value("float32")),
|
| 42 |
"dones": datasets.Sequence(datasets.Value("bool")),
|
|
|
|
| 43 |
}
|
| 44 |
)
|
| 45 |
|
| 46 |
return datasets.DatasetInfo(
|
|
|
|
| 47 |
description=_DESCRIPTION,
|
|
|
|
|
|
|
| 48 |
features=features,
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
)
|
| 50 |
|
| 51 |
def _split_generators(self, dl_manager):
|