MLContext (Apache SystemDS 3.4.0-SNAPSHOT API)

All Methods Static Methods Instance Methods Concrete Methods  Modifier and Type Method Description String buildTime()

Obtain the SystemDS jar file build time.

void close()

Closes the mlcontext, which includes the cleanup of static and local state as well as scratch space and buffer pool cleanup.

MLResults execute​(Script script)

Execute a DML or PYDML Script.

MLResults execute​(Script script, ScriptExecutor scriptExecutor)

Execute a DML or PYDML Script object using a ScriptExecutor.

static MLContext getActiveMLContext()

Retrieve the currently active MLContext.

MLContext.ExecutionType getExecutionType()

Obtain the current execution environment.

MLContext.InternalProxy getInternalProxy()

Used internally by MLContextProxy.

org.apache.spark.sql.SparkSession getSparkSession()

Obtain the SparkSession associated with this MLContext.

int getStatisticsMaxHeavyHitters()

Obtain the maximum number of heavy hitters that are printed out as part of the statistics.

ProjectInfo info()

Obtain information about the project such as version and build time from the manifest in the SystemDS jar file.

boolean isExplain()

Whether or not an explanation of the DML/PYDML program should be output to standard output.

boolean isForceGPU()

Whether or not the "force" GPU mode is enabled.

boolean isGPU()

Whether or not the GPU mode is enabled.

boolean isInitBeforeExecution()

Whether or not the default ScriptExecutor should be initialized before execution.

boolean isMaintainSymbolTable()

Obtain whether or not all values should be maintained in the symbol table after execution.

boolean isStatistics()

Whether or not statistics of the DML/PYDML program execution should be output to standard output.

void resetConfig()

Reset configuration settings to default settings.

void setConfig​(String configFilePath)

Set SystemDS configuration based on a configuration file.

void setConfigProperty​(String propertyName, String propertyValue)

Set configuration property, such as setConfigProperty("sysds.localtmpdir", "/tmp/systemds").

void setExecutionScript​(Script executionScript)

Sets the script that is being executed

void setExecutionType​(MLContext.ExecutionType executionType)

Set the execution environment.

void setExplain​(boolean explain)

Whether or not an explanation of the DML/PYDML program should be output to standard output.

void setExplainLevel​(String explainLevel)

Set the level of program explanation that should be displayed if explain is set to true.

void setExplainLevel​(MLContext.ExplainLevel explainLevel)

Set the level of program explanation that should be displayed if explain is set to true.

void setForceGPU​(boolean enable)

Whether or not to explicitly "force" the usage of GPU.

void setGPU​(boolean enable)

Whether or not to use (an available) GPU on the driver node.

void setInitBeforeExecution​(boolean initBeforeExecution)

Whether or not the default ScriptExecutor should be initialized before execution.

void setLineage​(boolean lineage)

Set whether or not lineage should be traced

void setLineage​(LineageCacheConfig.ReuseCacheType reuse)

Set type of lineage-based reuse caching and enable lineage tracing

void setMaintainSymbolTable​(boolean maintainSymbolTable)

Set whether or not all values should be maintained in the symbol table after execution.

void setStatistics​(boolean statistics)

Whether or not statistics of the DML/PYDML program execution should be output to standard output.

void setStatisticsMaxHeavyHitters​(int maxHeavyHitters)

Sets the maximum number of heavy hitters that are printed out as part of the statistics.

String version()

Obtain the SystemDS version number.