Skip to content

Commit b20cdcb

Browse files
committed
fixes
1 parent 3d7a58d commit b20cdcb

3 files changed

Lines changed: 7 additions & 4 deletions

File tree

DataCollection.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -578,6 +578,9 @@ def invokeGenerator(self):
578578

579579
def generatorFunction(self):
580580

581+
if self.generator.isEmpty():
582+
raise Exception("DataCollection.generatorFunction: generator called with insufficient samples.")
583+
581584
while(not self.generator.isEmpty()):
582585

583586
data = self.generator.getBatch()
@@ -592,6 +595,6 @@ def generatorFunction(self):
592595
out = (xout,yout,wout)
593596
yield out
594597

595-
raise Exception("DataCollection.generatorFunction: generator ran out of samples. This should not have happened, please report bug.")
598+
596599

597600

bin/convertFromSource.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,9 @@
104104
traind=None
105105
if class_name in class_options:
106106
traind = class_options[class_name]
107-
elif not recover and not testdatafor:
107+
elif not recover:
108108
print('available classes:')
109-
for key, val in class_options.iteritems():
109+
for key, val in class_options.items():
110110
print(key)
111111
raise Exception('wrong class selection')
112112

bin/mergeDataCollections.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#! /bin/env python3
1+
#!/bin/env python3
22

33
from argparse import ArgumentParser
44
from DeepJetCore.DataCollection import DataCollection

0 commit comments

Comments
 (0)