Skip to content
Snippets Groups Projects
Commit 2cd71b60 authored by Franck Dary's avatar Franck Dary
Browse files

Fixed a problem where ConfigDataset was not giving batches

parent a81d26c9
No related branches found
No related tags found
No related merge requests found
......@@ -137,6 +137,10 @@ void ConfigDataset::computeNbToGive()
smallestSize = sizeLeft;
}
for (auto & it : holders)
nbToGive[it.first] = std::floor(1.0*it.second.sizeLeft()/smallestSize);
{
nbToGive[it.first] = std::max<int>(1,std::floor(1.0*it.second.sizeLeft()/smallestSize));
if (it.second.sizeLeft() == 0)
nbToGive[it.first] = 0;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment