neuralogicο
- initial_seed() int [source]ο
Returns the initial/current random seed for a random number generator used in the backend.
- initialize(debug_mode: bool = False, debug_port: int = 12999, is_debug_server: bool = True, debug_suspend: bool = True, *, seed: int | None = None, graphviz_path: str | None = None, max_memory_size: int | None = None, log_handler: LogHandler | None = None, jar_path: str | None = None, started_check: bool = True)[source]ο
Initialize the NeuraLogic backend. This function is called implicitly when needed and should be called manually only for debugging.
- Parameters:
debug_mode (bool) β Enable/Disable JVM debug mode.
debug_port (int) β Port for the debugger to listen on. Default:
12999
.is_debug_server (bool) β Act like server and listen for the debugger. Default:
True
debug_suspend (bool) β Wait until the debugger is connected. Default:
True
seed (Optional[int]) β The seed for the random number generator.
graphviz_path (Optional[str]) β The Graphviz path
max_memory_size (Optional[int]) β The maximum memory size (in gigabytes)
log_handler (Optional[LogHandler]) β The handler for logging
jar_path (Optional[str]) β The path to NeuraLogic java backend
started_check (bool) β Whether to check if the NeuraLogic has been started. If true and it has been started - raise an Exception
- manual_seed(seed: int)[source]ο
Sets the seed for a random number generator used in the backend to the passed
seed
.- Parameters:
seed (int) β The seed for the random number generator.
- seed() int [source]ο
Sets the seed for a random number generator used in the backend to a random seed and returns the seed.
- set_graphviz_path(path: str | None)[source]ο
Set the default path to Graphviz
- Parameters:
path (Optional[str]) β The Graphviz path
- set_jvm_options(options: List[str])[source]ο
Set the jvm options - by default
["-Xms1g"]
.- Parameters:
options (List[str]) β List of JVM options