#NEWLINE# def __init__( self , offlineCacheFunction , newMemLimit , remoteEvaluator = None , newLoadRatio = 0.5 , maxPageSizeInBytes = None , vdmOverride = None ) : #NEWLINE# #INDENT# if ( maxPageSizeInBytes is None ) : #NEWLINE# #INDENT# maxPageSizeInBytes = Setup . config ( ) . maxPageSizeInBytes #NEWLINE# #UNINDENT# if ( vdmOverride is not None ) : #NEWLINE# #INDENT# self . vdm_ = vdmOverride #NEWLINE# self . offlineCache_ = None #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . vdm_ = FORANative . VectorDataManager ( CallbackSchedulerNative . createSimpleCallbackSchedulerFactory ( ) . createScheduler ( 'LocalEvaluator' , 1 ) , maxPageSizeInBytes ) #NEWLINE# self . vdm_ . setDropUnreferencedPagesWhenFull ( True ) #NEWLINE# self . offlineCache_ = offlineCacheFunction ( self . vdm_ ) #NEWLINE# if ( self . offlineCache_ is not None ) : #NEWLINE# #INDENT# self . vdm_ . setOfflineCache ( self . offlineCache_ ) #NEWLINE# #UNINDENT# logging . info ( 'LocalEvaluator Creating VDMC with %s MB' , ( ( newMemLimit / 1024.0 ) / 1024.0 ) ) #NEWLINE# self . vdm_ . setMemoryLimit ( newMemLimit , int ( ( newMemLimit * 1.25 ) ) ) #NEWLINE# self . vdm_ . setLoadRatio ( newLoadRatio ) #NEWLINE# #UNINDENT# self . remoteEvaluator_ = remoteEvaluator #NEWLINE# self . cache_ = ComputationCache ( self . vdm_ , self . offlineCache_ )