public class ScriptExecutor extends Object
execute(org.apache.sysds.api.mlcontext.Script)
method.
Script execution via the MLContext API typically consists of the following steps:
Modifications to these steps can be accomplished by subclassing
ScriptExecutor. For more information, please see the execute(org.apache.sysds.api.mlcontext.Script)
method.
Constructor and Description |
---|
ScriptExecutor()
ScriptExecutor constructor.
|
ScriptExecutor(DMLConfig config)
ScriptExecutor constructor, where the configuration properties are passed
in.
|
Modifier and Type | Method and Description |
---|---|
void |
compile(Script script) |
void |
compile(Script script,
boolean performHOPRewrites)
Compile a DML or PYDML script.
|
MLResults |
execute(Script script)
Execute a DML or PYDML script.
|
DMLConfig |
getConfig()
Obtain the SystemDS configuration properties.
|
DMLProgram |
getDmlProgram()
Obtain the program
|
DMLTranslator |
getDmlTranslator()
Obtain the translator
|
ExecutionContext |
getExecutionContext()
Obtain the execution context
|
MLContext.ExecutionType |
getExecutionType()
Obtain the current execution environment.
|
Program |
getRuntimeProgram()
Obtain the runtime program
|
Script |
getScript()
Obtain the Script object associated with this ScriptExecutor
|
boolean |
isMaintainSymbolTable()
Obtain whether or not all values should be maintained in the symbol table
after execution.
|
void |
setConfig(DMLConfig config)
Set the SystemDS configuration properties.
|
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(MLContext.ExplainLevel explainLevel)
Set the level of program explanation that should be displayed if explain
is set to true.
|
void |
setForceGPU(boolean enabled)
Whether or not to force GPU usage.
|
void |
setGPU(boolean enabled)
Whether or not to enable GPU usage.
|
void |
setInit(boolean init)
Whether or not to initialize the scratch_space, bufferpool, etc.
|
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 about the DML/PYDML program should be output to
standard output.
|
void |
setStatisticsMaxHeavyHitters(int maxHeavyHitters)
Set the maximum number of heavy hitters to display with statistics.
|
public ScriptExecutor()
public ScriptExecutor(DMLConfig config)
config
- the configuration properties to use by the ScriptExecutorpublic void compile(Script script)
public void compile(Script script, boolean performHOPRewrites)
script
- the DML or PYDML script to compileperformHOPRewrites
- should perform static rewrites, perform intra-/inter-procedural analysis to propagate size information into functions and apply dynamic rewritespublic MLResults execute(Script script)
script
- the DML or PYDML script to executepublic void setConfig(DMLConfig config)
config
- The configuration propertiespublic DMLProgram getDmlProgram()
public DMLTranslator getDmlTranslator()
public Program getRuntimeProgram()
public ExecutionContext getExecutionContext()
public Script getScript()
public void setExplain(boolean explain)
explain
- true
if explanation should be output, false
otherwisepublic void setStatistics(boolean statistics)
statistics
- true
if statistics should be output, false
otherwisepublic void setStatisticsMaxHeavyHitters(int maxHeavyHitters)
maxHeavyHitters
- the maximum number of heavy hitterspublic boolean isMaintainSymbolTable()
true
if all values should be maintained in the symbol
table, false
otherwisepublic void setMaintainSymbolTable(boolean maintainSymbolTable)
maintainSymbolTable
- true
if all values should be maintained in the symbol
table, false
otherwisepublic void setInit(boolean init)
init
- true
if should initialize, false
otherwisepublic void setExplainLevel(MLContext.ExplainLevel explainLevel)
explainLevel
- the level of program explanationpublic void setGPU(boolean enabled)
enabled
- true
if enabled, false
otherwisepublic void setForceGPU(boolean enabled)
enabled
- true
if enabled, false
otherwisepublic DMLConfig getConfig()
public MLContext.ExecutionType getExecutionType()
public void setExecutionType(MLContext.ExecutionType executionType)
executionType
- the execution environmentCopyright © 2021 The Apache Software Foundation. All rights reserved.