Code documentation
Contains classes for initializing RuleKit Java backend
- class rulekit.main.RuleKit
Class used for initializing RuleKit. It starts JVM underhood and setups it with jars.
Note
Since version 1.7.0 there is no need to manually initialize RuleKit.
You may just skip the RuleKit.init() line. However in certain scenarios when you want use a custom RuleKit jar file or modify Java VM parameters, this class can be used.
- version
version of RuleKit jar used by wrapper (not equal to python package version).
- Type:
str
- static configure_java_logger(log_file_path: str, verbosity_level: int = 1)
Enable Java debug logging. You probably don’t need to use this method unless you want too deep dive into the process of rules inductions
or your’re debugging some issues.
- Parameters:
log_file_path (str) – Path to the file where logs will be stored
verbosity_level (int, optional) – Verbosity level. Minimum value is 1, maximum value is 2, default value is 1.
- static get_java_logger_config() _RuleKitJavaLoggerConfig | None
Returns the Java logger configuration configured using configure_java_logger method
- Returns:
Java logger configuration
- Return type:
Optional[_RuleKitJavaLoggerConfig]
- static init(initial_heap_size: int | None = None, max_heap_size: int | None = None, rulekit_jar_file_path: str | None = None)
Initialize package.
This method configure and starts JVM and load RuleKit jar file.
Note
Since version 1.7.0 it don’t have to be called before using any
operator class. However in certain scenarios when you want use a custom RuleKit jar file or modify Java VM parameters, this method can be used.
- Parameters:
initial_heap_size (int) – JVM initial heap size in mb
max_heap_size (int) – JVM max heap size in mb
rulekit_jar_file_path (str) –
Path to the RuleKit jar file. This parameters. .. note:
You probably don't need to use this parameter unless you want to use your own custom version of RuleKit jar file. Otherwise leave it as it is and the package will use the official RuleKit release jar file.
- Raises:
Exception – If failed to load RuleKit jar file.
Table of contents: