Datasets:

Languages:
English
License:
alkzar90 commited on
Commit
81fcbb0
·
unverified ·
1 Parent(s): 1199fe5

remove custom loading script

Browse files
Files changed (1) hide show
  1. parlogs-observations.py +0 -91
parlogs-observations.py DELETED
@@ -1,91 +0,0 @@
1
- """Loading script for Paranal Logs Observations."""
2
-
3
- import datasets
4
- import pandas as pd
5
-
6
- logger = datasets.logging.get_logger(__name__)
7
-
8
- # Add metadata here
9
- _DESCRIPTION = """
10
- Paranal Logs Observations is a dataset of observations from the Paranal Observatory.
11
- """
12
- _HOMEPAGE = "https://github.com/paranal-sw/parlogs-observations"
13
- _LICENSE = "LGPL-2.1"
14
- _VERSION = "0.1.0"
15
- _CITATION = ""
16
-
17
-
18
- # Add the root directory of the dataset here
19
- _ROOT = "https://huggingface.co/datasets/Paranal/parlogs-observations/resolve/main/data"
20
-
21
- class ParlogsObsDBConfig(datasets.BuilderConfig):
22
- """BuilderConfig for ParlogsObsDB."""
23
-
24
- def __init__(self, name, **kwargs):
25
- """Constructs a ParlogsObsDBConfig.
26
- Args:
27
- **kwargs: keyword arguments forwarded to super.
28
- """
29
- super(ParlogsObsDBConfig, self).__init__(
30
- version=_VERSION,
31
- name=name,
32
- description=_DESCRIPTION,
33
- **kwargs,
34
- )
35
-
36
- class ParlogsObsDB(datasets.GeneratorBasedBuilder):
37
- """Paranal Logs Observations."""
38
-
39
- BUILDER_CONFIGS = [
40
- ParlogsObsDBConfig(name="GRAVITY-1d"),
41
- ]
42
-
43
- def _info(self):
44
- if self.config.name == "GRAVITY-1d":
45
- features = datasets.Features(
46
- {
47
- "@timestamp": datasets.Value("timestamp[s, tz=America/Santiago]"),
48
- "system": datasets.Value("string"),
49
- "hostname": datasets.Value("string"),
50
- "loghost": datasets.Value("string"),
51
- "logtype": datasets.Value("string"),
52
- "envname": datasets.Value("string"),
53
- "procname": datasets.Value("string"),
54
- "procid": datasets.Value("string"),
55
- "module": datasets.Value("string"),
56
- "keywname": datasets.Value("string"),
57
- "keywvalue": datasets.Value("string"),
58
- "keywmask": datasets.Value("string"),
59
- "logtext": datasets.Value("string"),
60
- "trace_id": datasets.Value("int64"),
61
- }
62
- )
63
-
64
- return datasets.DatasetInfo(
65
- description=_DESCRIPTION,
66
- features=features,
67
- homepage=_HOMEPAGE,
68
- license=_LICENSE,
69
- citation=_CITATION,
70
- )
71
-
72
- def _split_generators(self, dl_manager):
73
-
74
- if self.config.name == "GRAVITY-1d":
75
- INSTRUMENT, RANGE = self.config.name.split("-")
76
- return [
77
- datasets.SplitGenerator(
78
- name=datasets.Split.TRAIN,
79
- gen_kwargs={
80
- "filepath": f'{_ROOT}/{INSTRUMENT}-{RANGE}-meta.parket',
81
- "split": "train",
82
- },
83
- ),
84
- ]
85
-
86
- def _generate_examples(self, filepath, split):
87
-
88
- if self.config.name == "GRAVITY-1d":
89
- out = pd.read_parquet(filepath).to_dict('records')
90
- logger.info(f'output: {out}')
91
- return out