Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jkiesele committed Jun 12, 2020
1 parent 3d7a58d commit b20cdcb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
5 changes: 4 additions & 1 deletion DataCollection.py
Original file line number Diff line number Diff line change
Expand Up @@ -578,6 +578,9 @@ def invokeGenerator(self):

def generatorFunction(self):

if self.generator.isEmpty():
raise Exception("DataCollection.generatorFunction: generator called with insufficient samples.")

while(not self.generator.isEmpty()):

data = self.generator.getBatch()
Expand All @@ -592,6 +595,6 @@ def generatorFunction(self):
out = (xout,yout,wout)
yield out

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



4 changes: 2 additions & 2 deletions bin/convertFromSource.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,9 @@
traind=None
if class_name in class_options:
traind = class_options[class_name]
elif not recover and not testdatafor:
elif not recover:
print('available classes:')
for key, val in class_options.iteritems():
for key, val in class_options.items():
print(key)
raise Exception('wrong class selection')

Expand Down
2 changes: 1 addition & 1 deletion bin/mergeDataCollections.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /bin/env python3
#!/bin/env python3

from argparse import ArgumentParser
from DeepJetCore.DataCollection import DataCollection
Expand Down

0 comments on commit b20cdcb

Please sign in to comment.