Added Limited Epoch Event Buffer
for better frontend performance when using big max epoch number
This commit is contained in:
@@ -51,6 +51,16 @@ class DataSetReader {
|
||||
return $randomLine;
|
||||
}
|
||||
|
||||
public function getNextLine(): array | null {
|
||||
if (!isset($this->currentLines[0])) {
|
||||
return null; // No more lines to read
|
||||
}
|
||||
|
||||
$this->lastReadLineIndex = array_search($this->currentLines[0], $this->lines, true);
|
||||
|
||||
return array_shift($this->currentLines);
|
||||
}
|
||||
|
||||
public function getInputSize(): int
|
||||
{
|
||||
return count($this->lines[0]) - 1; // Don't count the label
|
||||
|
||||
Reference in New Issue
Block a user