class pot::NestedEngineOracle¶
Overview¶
An oracle built by hosting another engine plugin. More…
#include <gpr/potentials/NestedEngineOracle.h>
class NestedEngineOracle {
public:
// construction
NestedEngineOracle(const NestedEngineOracle&);
~NestedEngineOracle();
// methods
static std::unique_ptr<NestedEngineOracle> open(const std::string& library, const std::vector<unsigned char>& config, std::string& err);
NestedEngineOracle& operator=(const NestedEngineOracle&);
ActiveGP::OracleFn asOracle();
const std::string& library() const;
};
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¶
static std::unique_ptr<NestedEngineOracle> open(const std::string& library, const std::vector<unsigned char>& config, std::string& err)
Parameters:
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. |
ActiveGP::OracleFn asOracle()
Ground truth in the shape ActiveGP consumes.