Skip to content

Commit

Permalink
some fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jkiesele committed Jan 23, 2024
1 parent d31f188 commit e8cfc78
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/djcdata/DataCollection.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@


from . import TrainData
from .compiled import trainDataGenerator
from .dataPipeline import TrainDataGenerator
import tempfile
import pickle
Expand Down Expand Up @@ -375,8 +376,6 @@ def createDataFromSource(
def __writeData(self, sample, outputDir):
sw=stopwatch()
td=self.dataclass()

fileTimeOut(sample,120) #once available copy to ram

sbasename = os.path.basename(sample)
newname = sbasename[:sbasename.rfind('.')]+'.djctd'
Expand All @@ -391,7 +390,7 @@ def __writeData(self, sample, outputDir):
if not self.batch_mode:
self.writeToFile(outputDir+'/snapshot.djcdc')

def _writeData_async(self,index,woq,wrlck,outputDir):
def _writeData_async(self,index,woq,wrlck,outputDir,tempstoragepath):

logger.info('async started')

Expand Down Expand Up @@ -473,7 +472,7 @@ def _writeData_async_andCollect(self, startindex, outputDir):
processrunning=[]
processfinished=[]
for i in range(startindex,len(self.sourceList)):
processes.append(Process(target=self._writeData_async, args=(i,wo_queue,writelock, outputDir) ) )
processes.append(Process(target=self._writeData_async, args=(i,wo_queue,writelock, outputDir, tempstoragepath) ) )
processrunning.append(False)
processfinished.append(False)

Expand Down

0 comments on commit e8cfc78

Please sign in to comment.