Skip to content

Commit

Permalink
Always set batchsize as int (#913)
Browse files Browse the repository at this point in the history
  • Loading branch information
linnik authored and torzdf committed Oct 26, 2019
1 parent 6efafab commit 9af7726
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/extract/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ def _set_extractor_batchsize(self):
@staticmethod
def _set_plugin_batchsize(plugin, available_vram):
""" Set the batch size for the given plugin based on given available vram """
plugin.batchsize = max(1, available_vram // plugin.vram_per_batch)
plugin.batchsize = int(max(1, available_vram // plugin.vram_per_batch))
logger.verbose("Reset batchsize for %s to %s", plugin.name, plugin.batchsize)

def _join_threads(self):
Expand Down

0 comments on commit 9af7726

Please sign in to comment.