To receive notifications about scheduled maintenance, please subscribe to the mailing-list gitlab-operations@sympa.ethz.ch. You can subscribe to the mailing-list at https://sympa.ethz.ch

Commit 757a5e4d authored by matthmey's avatar matthmey
Browse files

addded warning

parent 74f5259c
......@@ -364,10 +364,10 @@ class SeismicSource(DataSource):
del x.attrs["stats"]
# x.rename({'seed_id':'channels'}) #TODO: rename seed_id to channels
# print(x.shape)
# print(x.shape)
# TODO: same check for obspy
if len(x['seed_id']) != len(config['channel']):
warnings.warn('Inconsistent data: Not all channels could be loaded')
if len(x["seed_id"]) != len(config["channel"]):
warnings.warn("Inconsistent data: Not all channels could be loaded")
return x
def process_seismic_data(
......@@ -1422,7 +1422,7 @@ class SegmentedDataset(Dataset):
warnings.simplefilter("default")
except Exception as e:
warnings.simplefilter("default")
print('Ignoring file',e)
print("Ignoring file", e)
continue
# TODO: maybe this can be done faster (and cleaner)
i = o[0]
......@@ -1433,7 +1433,7 @@ class SegmentedDataset(Dataset):
label = str(label)
if label not in self.classes:
self.classes.append(label)
if i not in label_dict:
label_dict[i] = {"indexers": slices[i], "labels": [label]}
elif label not in label_dict[i]["labels"]:
......@@ -1610,7 +1610,7 @@ class SegmentedDataset(Dataset):
# class PytorchDataset(DataSource): # TODO: extends pytorch dataset
# def __init__(self, source=None):
# """ Creates a pytorch like dataset from a data source and a label source.
# Arguments:
# DataSource {[type]} -- [description]
# config {dict} -- configuration for labels
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment