.. index:: pair: class; pot::NestedEngineOracle .. _doxid-classpot_1_1_nested_engine_oracle: class pot::NestedEngineOracle ============================= .. toctree:: :hidden: Overview ~~~~~~~~ An oracle built by hosting another engine plugin. :ref:`More...` .. ref-code-block:: cpp :class: doxyrest-overview-code-block #include class NestedEngineOracle { public: // construction :target:`NestedEngineOracle`(const NestedEngineOracle&); :target:`~NestedEngineOracle`(); // methods static std::unique_ptr<:ref:`NestedEngineOracle`> :ref:`open`(const std::string& library, const std::vector& config, std::string& err); :ref:`NestedEngineOracle`& :target:`operator=`(const :ref:`NestedEngineOracle`&); :ref:`ActiveGP::OracleFn` :ref:`asOracle`(); const std::string& :target:`library`() const; }; .. _details-classpot_1_1_nested_engine_oracle: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ An oracle built by hosting another engine plugin. The learning engine's config names its ground truth as a nested PotentialSpec rather than receiving it through callbacks, because the host that loads a learning engine may have no way to supply one: eOn's GenericEngineLoader resolves create, destroy and force, and never calls set_callbacks. An engine that waits for a callback is loadable there and unusable. So this does to its oracle exactly what a host does to it. Backend selection stays "which library gets dlopened", one level down: the spec names a backend, that names a library, and the nested params travel to it as its own capnp message over the same C ABI. Methods ------- .. index:: pair: function; open .. _doxid-classpot_1_1_nested_engine_oracle_1ad5dc225b06486d39e15575b6c9f70da5: .. ref-code-block:: cpp :class: doxyrest-title-code-block static std::unique_ptr<:ref:`NestedEngineOracle`> open(const std::string& library, const std::vector& config, std::string& err) .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - library - engine library to dlopen, e.g. "libuma_engine.so". * - config - capnp message for THAT engine's params arm. * - err - failure detail when construction returns nullptr. .. index:: pair: function; asOracle .. _doxid-classpot_1_1_nested_engine_oracle_1ace8461a3aea59234ca91e413c459015c: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`ActiveGP::OracleFn` asOracle() Ground truth in the shape :ref:`ActiveGP ` consumes.