I was able to determine that the issue is related to trying to batch the data. When running on single mode, where I feed one row at a time, the memory does not increase over time and stays relatively constant