Mila main API namespace.
More...
◆ getAPIVersion()
Gets the current Mila runtime API version.
- Returns
- A Version object describing the running library.
The version components are injected by the build as PUBLIC compile definitions (see the Versioning block in Mila/CMakeLists.txt), sourced from Version.txt. find_package consumers recompile this module unit and pick the definitions up via the exported target's interface, so no version header is shipped.
◆ initialize()
| bool Mila::initialize |
( |
unsigned int | randomSeed = 0, |
|
|
std::shared_ptr< Logging::Logger > | sink = nullptr ) |
|
export |
Initializes the Mila framework.
Must be called before using any other Mila functionality. If no sink is provided a NullSink is used, suppressing all log output — appropriate for applications linking Mila as a static library that manage their own logging. Pass an explicit sink to opt in to Mila log output.
- Parameters
-
| randomSeed | Random seed for reproducibility. 0 = non-deterministic. |
| sink | Logging sink to register. nullptr = NullSink (silent). |
- Returns
- True if initialization succeeded, false otherwise.
- Exceptions
-
| Any | exception thrown during initialization is propagated to the caller; the application is responsible for handling it. |
@ Warning
Unexpected conditions that do not prevent continued operation.
Definition Logger.ixx:45
@ Info
Normal operational milestones (model loaded, server ready).
Definition Logger.ixx:44
bool initialize(unsigned int randomSeed=0, std::shared_ptr< Logging::Logger > sink=nullptr)
Initializes the Mila framework.
Definition Mila.ixx:309
◆ shutdown()
Shuts down the Mila framework and releases all resources.
Flushes any pending log output through the registered sink before releasing it. After this call no further log calls should be made until initialize() is called again.
- Exceptions
-
| Any | exception thrown during shutdown is propagated to the caller. |