helenqu commited on
Commit
0af5bb3
·
1 Parent(s): c3ed550
.gitattributes CHANGED
@@ -1,55 +1,12 @@
1
- *.7z filter=lfs diff=lfs merge=lfs -text
2
- *.arrow filter=lfs diff=lfs merge=lfs -text
3
- *.bin filter=lfs diff=lfs merge=lfs -text
4
- *.bz2 filter=lfs diff=lfs merge=lfs -text
5
- *.ckpt filter=lfs diff=lfs merge=lfs -text
6
- *.ftz filter=lfs diff=lfs merge=lfs -text
7
- *.gz filter=lfs diff=lfs merge=lfs -text
8
- *.h5 filter=lfs diff=lfs merge=lfs -text
9
- *.joblib filter=lfs diff=lfs merge=lfs -text
10
- *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
- *.lz4 filter=lfs diff=lfs merge=lfs -text
12
- *.mlmodel filter=lfs diff=lfs merge=lfs -text
13
- *.model filter=lfs diff=lfs merge=lfs -text
14
- *.msgpack filter=lfs diff=lfs merge=lfs -text
15
- *.npy filter=lfs diff=lfs merge=lfs -text
16
- *.npz filter=lfs diff=lfs merge=lfs -text
17
- *.onnx filter=lfs diff=lfs merge=lfs -text
18
- *.ot filter=lfs diff=lfs merge=lfs -text
19
- *.parquet filter=lfs diff=lfs merge=lfs -text
20
- *.pb filter=lfs diff=lfs merge=lfs -text
21
- *.pickle filter=lfs diff=lfs merge=lfs -text
22
- *.pkl filter=lfs diff=lfs merge=lfs -text
23
- *.pt filter=lfs diff=lfs merge=lfs -text
24
- *.pth filter=lfs diff=lfs merge=lfs -text
25
- *.rar filter=lfs diff=lfs merge=lfs -text
26
- *.safetensors filter=lfs diff=lfs merge=lfs -text
27
- saved_model/**/* filter=lfs diff=lfs merge=lfs -text
28
- *.tar.* filter=lfs diff=lfs merge=lfs -text
29
- *.tar filter=lfs diff=lfs merge=lfs -text
30
- *.tflite filter=lfs diff=lfs merge=lfs -text
31
- *.tgz filter=lfs diff=lfs merge=lfs -text
32
- *.wasm filter=lfs diff=lfs merge=lfs -text
33
- *.xz filter=lfs diff=lfs merge=lfs -text
34
- *.zip filter=lfs diff=lfs merge=lfs -text
35
- *.zst filter=lfs diff=lfs merge=lfs -text
36
- *tfevents* filter=lfs diff=lfs merge=lfs -text
37
- # Audio files - uncompressed
38
- *.pcm filter=lfs diff=lfs merge=lfs -text
39
- *.sam filter=lfs diff=lfs merge=lfs -text
40
- *.raw filter=lfs diff=lfs merge=lfs -text
41
- # Audio files - compressed
42
- *.aac filter=lfs diff=lfs merge=lfs -text
43
- *.flac filter=lfs diff=lfs merge=lfs -text
44
- *.mp3 filter=lfs diff=lfs merge=lfs -text
45
- *.ogg filter=lfs diff=lfs merge=lfs -text
46
- *.wav filter=lfs diff=lfs merge=lfs -text
47
- # Image files - uncompressed
48
- *.bmp filter=lfs diff=lfs merge=lfs -text
49
- *.gif filter=lfs diff=lfs merge=lfs -text
50
- *.png filter=lfs diff=lfs merge=lfs -text
51
- *.tiff filter=lfs diff=lfs merge=lfs -text
52
- # Image files - compressed
53
- *.jpg filter=lfs diff=lfs merge=lfs -text
54
- *.jpeg filter=lfs diff=lfs merge=lfs -text
55
- *.webp filter=lfs diff=lfs merge=lfs -text
 
1
+ plasticc_test_lightcurves_11.csv.jsonl filter=lfs diff=lfs merge=lfs -text
2
+ plasticc_test_lightcurves_08.csv.jsonl filter=lfs diff=lfs merge=lfs -text
3
+ plasticc_test_lightcurves_02.csv.jsonl filter=lfs diff=lfs merge=lfs -text
4
+ plasticc_test_lightcurves_03.csv.jsonl filter=lfs diff=lfs merge=lfs -text
5
+ plasticc_test_lightcurves_04.csv.jsonl filter=lfs diff=lfs merge=lfs -text
6
+ plasticc_test_lightcurves_05.csv.jsonl filter=lfs diff=lfs merge=lfs -text
7
+ plasticc_test_lightcurves_06.csv.jsonl filter=lfs diff=lfs merge=lfs -text
8
+ plasticc_test_lightcurves_07.csv.jsonl filter=lfs diff=lfs merge=lfs -text
9
+ plasticc_test_lightcurves_09.csv.jsonl filter=lfs diff=lfs merge=lfs -text
10
+ plasticc_test_lightcurves_01.csv.jsonl filter=lfs diff=lfs merge=lfs -text
11
+ plasticc_train_lightcurves.csv.jsonl filter=lfs diff=lfs merge=lfs -text
12
+ plasticc_test_lightcurves_10.csv.jsonl filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
just_train_set.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ /pscratch/sd/h/helenqu/plasticc/raw/plasticc_raw_examples/plasticc_train_lightcurves.csv.jsonl
plasticc_raw_examples.py ADDED
@@ -0,0 +1,104 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright 2020 The HuggingFace Datasets Authors and the current dataset script contributor.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+ # TODO: Address all TODOs and remove all explanatory comments
15
+ """TODO: Add a description here."""
16
+
17
+ import pandas as pd
18
+ import numpy as np
19
+ from pathlib import Path
20
+ import jsonlines
21
+ from connect_later.split_dataset_into_files import split_dataset_into_files
22
+ import torch
23
+ import pdb
24
+
25
+ import datasets
26
+
27
+ DATASET_PATH = "/pscratch/sd/h/helenqu/plasticc/raw/plasticc_raw_examples"
28
+
29
+ # TODO: Add BibTeX citation
30
+ # Find for instance the citation on arxiv or on the dataset repo/website
31
+ _CITATION = """\
32
+ @InProceedings{huggingface:dataset,
33
+ title = {A great new dataset},
34
+ author={huggingface, Inc.
35
+ },
36
+ year={2020}
37
+ }
38
+ """
39
+
40
+ # TODO: Add description of the dataset here
41
+ # You can copy an official description
42
+ _DESCRIPTION = """\
43
+ This new dataset is designed to solve this great NLP task and is crafted with a lot of care.
44
+ """
45
+
46
+ # TODO: Name of the dataset usually matches the script name with CamelCase instead of snake_case
47
+ class NewDataset(datasets.GeneratorBasedBuilder):
48
+ """TODO: Short description of my dataset."""
49
+
50
+ VERSION = datasets.Version("1.1.0")
51
+
52
+ def _info(self):
53
+ # TODO: This method specifies the datasets.DatasetInfo object which contains informations and typings for the dataset
54
+ # if self.config.name == "first_domain": # This is the name of the configuration selected in BUILDER_CONFIGS above
55
+ features = datasets.Features(
56
+ {
57
+ "objid": datasets.Value("int32"),
58
+ "times_wv": datasets.Array2D(shape=(300, 2), dtype='float64'), # ith row is [time, central wv of band]
59
+ "target": datasets.Array2D(shape=(300, 2), dtype='float64'), # the time series data, ith row is [flux, flux_err]
60
+ }
61
+ )
62
+ return datasets.DatasetInfo(
63
+ # This is the description that will appear on the datasets page.
64
+ description=_DESCRIPTION,
65
+ # This defines the different columns of the dataset and their types
66
+ features=features, # Here we define them above because they are different between the two configurations
67
+ )
68
+
69
+ def _split_generators(self, dl_manager):
70
+ # TODO: This method is tasked with downloading/extracting the data and defining the splits depending on the configuration
71
+ # If several configurations are possible (listed in BUILDER_CONFIGS), the configuration selected by the user is in self.config.name
72
+
73
+ # dl_manager is a datasets.download.DownloadManager that can be used to download and extract URLS
74
+ # It can accept any type or nested list/dict and will give back the same structure with the url replaced with path to local files.
75
+ # By default the archives will be extracted and a path to a cached folder where they are extracted is returned instead of the archive
76
+ dataset_path = Path(DATASET_PATH)
77
+ # if not (dataset_path / 'train.csv').exists():
78
+ # print('Splitting dataset into files...')
79
+ # split_dataset_into_files(dataset_path, "prepr*csv", 0.8, fraction=0.15, required_paths=[dataset_path / "orig_train_set.csv"]) # full dataset size is 256G, trying to keep it under 40G for now since that's the size of the GPU mem
80
+
81
+ return [
82
+ datasets.SplitGenerator(
83
+ name=datasets.Split.TRAIN,
84
+ # These kwargs will be passed to _generate_examples
85
+ gen_kwargs={
86
+ "filepath": self.config.data_files['train'] if self.config.data_files is not None else dataset_path.glob('*.jsonl'),
87
+ "split": "train",
88
+ },
89
+ ),
90
+ ]
91
+
92
+ # method parameters are unpacked from `gen_kwargs` as given in `_split_generators`
93
+ def _generate_examples(self, filepath, split):
94
+ # TODO: This method handles input defined in _split_generators to yield (key, example) tuples from the dataset.
95
+ # The `key` is for legacy reasons (tfds) and is not important in itself, but must be unique for each example.
96
+ for path in filepath:
97
+ with jsonlines.open(path) as reader:
98
+ for obj in reader:
99
+ yield int(obj['object_id']), {
100
+ "objid": int(obj['object_id']),
101
+ "times_wv": obj['times_wv'],
102
+ # "target": np.transpose(np.array(obj['lightcurve'], dtype='float64')),
103
+ "target": obj['lightcurve'],
104
+ }
plasticc_test_lightcurves_01.csv.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7ebb0b95c777eec65c1cfc551eb54c1e8e0f14ab0921c9711b1a5b2f3a70c93d
3
+ size 441752420
plasticc_test_lightcurves_02.csv.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:868123d23d2f661bd1017cc304db400e50dcff994dea135b46369407af93f512
3
+ size 3722399731
plasticc_test_lightcurves_03.csv.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:226bc8ca25c6f8d263320a05e8885cc915aa7ea05156442d8bdfb0e810f4e7fb
3
+ size 3722250258
plasticc_test_lightcurves_04.csv.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:02dde72f31bb3a129e0bd42c28ca9259329671cda5e39a932d424923a81a8d4f
3
+ size 3722971749
plasticc_test_lightcurves_05.csv.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:57c5383bb815d4a63958d2f6381eb3afae857b411ccaf2cab2a4ea151e990407
3
+ size 3722508077
plasticc_test_lightcurves_06.csv.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fe1e8355d3b94282e0473c8943aa6a35fd7f82168b409493773310f17694425d
3
+ size 3722275652
plasticc_test_lightcurves_07.csv.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b5f18f9cc83852409fce3056abae9138d2090f2af665c644084e1c356aa40258
3
+ size 3722275899
plasticc_test_lightcurves_08.csv.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5d680a4432f0d94e545aa8b4b5affcf38308315ccb58d23d416b2f83ed728ab1
3
+ size 3722574343
plasticc_test_lightcurves_09.csv.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:33641ffe0c2c320a97eb6438223f322e66029f35a462c1a82243f9dcc75f98c9
3
+ size 3722493513
plasticc_test_lightcurves_10.csv.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4e238c8d564ca4f288fedff57e00464f87e5b5875930abacf9a3fa5e01d3ee63
3
+ size 3722795101
plasticc_test_lightcurves_11.csv.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:787746012cc1b338cc29186f20bdebfdc65574697b8217eb771be0a5be2d70e0
3
+ size 3722600668
plasticc_train_lightcurves.csv.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4c6b3b77d4366a9363c371d85dce6163dc056056d611d61cee4ea8c2fa42e96c
3
+ size 90215690
single_test_file.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ plasticc_test_lightcurves_03.csv.jsonl