Package org.apache.sysds.api
Class DMLScript
java.lang.Object
org.apache.sysds.api.DMLScript
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic booleanstatic booleanstatic Stringstatic Stringstatic booleanstatic longstatic longstatic Explain.ExplainTypestatic booleanstatic intstatic booleanstatic Stringstatic booleanstatic Stringstatic doublestatic booleanstatic booleanstatic booleanstatic booleanstatic booleanstatic Stringstatic booleanstatic Stringstatic booleanstatic intstatic booleanstatic intstatic booleanstatic booleanstatic intstatic intstatic int[]static booleanstatic booleanstatic intstatic booleanstatic booleanstatic booleanstatic booleanstatic booleanIf true, allow DMLProgram to be generated while not halting due to validation errors/warnings -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcleanupHadoopExecution(DMLConfig config) static voidPrint the error in a user friendly manner.static booleanexecuteScript(String[] args) Single entry point for all public invocation alternatives (e.g., main, executeScript, JaqlUdf etc)static Types.ExecModestatic StringgetUUID()static voidinitHadoopExecution(DMLConfig config) static booleanstatic voidloadConfiguration(String fnameOptConfig) static voidMain entry point for systemDS dml script executionstatic StringreadDMLScript(boolean isFile, String scriptOrFilename) Reads the DML/PyDML script into a Stringstatic voidstatic voidstatic voidsetGlobalFlags(DMLConfig dmlconf) Sets the global flags in DMLScript based on user provided configurationstatic voidUsed to set master UUID on all nodes (in parfor remote, where DMLScript passed) in order to simplify cleanup of scratch_space and local working dirs.static boolean
-
Field Details
-
STATISTICS
public static boolean STATISTICS -
STATISTICS_NGRAMS
public static boolean STATISTICS_NGRAMS -
JMLC_MEM_STATISTICS
public static boolean JMLC_MEM_STATISTICS -
STATISTICS_COUNT
public static int STATISTICS_COUNT -
STATISTICS_NGRAM_SIZES
public static int[] STATISTICS_NGRAM_SIZES -
STATISTICS_TOP_K_NGRAMS
public static int STATISTICS_TOP_K_NGRAMS -
STATISTICS_NGRAMS_USE_LINEAGE
public static boolean STATISTICS_NGRAMS_USE_LINEAGE -
STATISTICS_MAX_WRAP_LEN
public static int STATISTICS_MAX_WRAP_LEN -
FED_STATISTICS
public static boolean FED_STATISTICS -
FED_STATISTICS_COUNT
public static int FED_STATISTICS_COUNT -
FED_WORKER
public static boolean FED_WORKER -
EXPLAIN
-
DML_FILE_PATH_ANTLR_PARSER
-
FLOATING_POINT_PRECISION
-
PRINT_GPU_MEMORY_INFO
public static boolean PRINT_GPU_MEMORY_INFO -
EVICTION_SHADOW_BUFFER_MAX_BYTES
public static long EVICTION_SHADOW_BUFFER_MAX_BYTES -
EVICTION_SHADOW_BUFFER_CURR_BYTES
public static long EVICTION_SHADOW_BUFFER_CURR_BYTES -
GPU_MEMORY_UTILIZATION_FACTOR
public static double GPU_MEMORY_UTILIZATION_FACTOR -
GPU_MEMORY_ALLOCATOR
-
LINEAGE
public static boolean LINEAGE -
LINEAGE_DEDUP
public static boolean LINEAGE_DEDUP -
LINEAGE_REUSE
-
LINEAGE_POLICY
-
LINEAGE_ESTIMATE
public static boolean LINEAGE_ESTIMATE -
LINEAGE_DEBUGGER
public static boolean LINEAGE_DEBUGGER -
USE_ACCELERATOR
public static boolean USE_ACCELERATOR -
FORCE_ACCELERATOR
public static boolean FORCE_ACCELERATOR -
SYNCHRONIZE_GPU
public static boolean SYNCHRONIZE_GPU -
USE_OOC
public static boolean USE_OOC -
OOC_STATISTICS
public static boolean OOC_STATISTICS -
OOC_STATISTICS_COUNT
public static int OOC_STATISTICS_COUNT -
OOC_LOG_EVENTS
public static boolean OOC_LOG_EVENTS -
OOC_LOG_PATH
-
EAGER_CUDA_FREE
public static boolean EAGER_CUDA_FREE -
SEED
public static int SEED -
SPARSE_INTERMEDIATE
public static boolean SPARSE_INTERMEDIATE -
MONITORING_ADDRESS
-
_suppressPrint2Stdout
public static boolean _suppressPrint2Stdout -
USE_LOCAL_SPARK_CONFIG
public static boolean USE_LOCAL_SPARK_CONFIG -
_activeAM
public static boolean _activeAM -
VALIDATOR_IGNORE_ISSUES
public static boolean VALIDATOR_IGNORE_ISSUESIf true, allow DMLProgram to be generated while not halting due to validation errors/warnings -
_uuid
-
-
Constructor Details
-
DMLScript
public DMLScript()
-
-
Method Details
-
getUUID
-
setUUID
Used to set master UUID on all nodes (in parfor remote, where DMLScript passed) in order to simplify cleanup of scratch_space and local working dirs.- Parameters:
uuid- master UUID to set on all nodes
-
suppressPrint2Stdout
public static boolean suppressPrint2Stdout() -
setActiveAM
public static void setActiveAM() -
isActiveAM
public static boolean isActiveAM() -
main
Main entry point for systemDS dml script execution- Parameters:
args- command-line arguments
-
executeScript
public static boolean executeScript(String[] args) throws IOException, ParseException, DMLScriptException Single entry point for all public invocation alternatives (e.g., main, executeScript, JaqlUdf etc)- Parameters:
args- arguments- Returns:
- true if success, false otherwise
- Throws:
IOException- If an internal IOException happens.ParseExceptionDMLScriptException
-
readDMLScript
Reads the DML/PyDML script into a String- Parameters:
isFile- Whether the string argument is a path to a file or the script itselfscriptOrFilename- script or filename- Returns:
- a string representation of the script
- Throws:
IOException- if error
-
loadConfiguration
- Throws:
IOException
-
setGlobalFlags
Sets the global flags in DMLScript based on user provided configuration- Parameters:
dmlconf- user provided configuration
-
initHadoopExecution
public static void initHadoopExecution(DMLConfig config) throws IOException, ParseException, DMLRuntimeException -
cleanupHadoopExecution
- Throws:
IOExceptionParseException
-
getGlobalExecMode
-
setGlobalExecMode
-
errorPrint
Print the error in a user friendly manner.- Parameters:
e- The exception thrown.
-