#include <gpr/auxiliary/MlflowFileStore.h>
Classes | |
| struct | Options |
Public Types | |
| enum class | Status { Running = 1 , Finished = 3 , Failed = 4 , Killed = 5 } |
Public Member Functions | |
| ~MlflowRun () | |
| MlflowRun (const MlflowRun &)=delete | |
| MlflowRun & | operator= (const MlflowRun &)=delete |
| void | logParam (std::string_view key, std::string_view value) |
| void | logParam (std::string_view key, double value) |
| void | logParam (std::string_view key, long value) |
| void | logMetric (std::string_view key, double value, long step=0) |
| void | setTag (std::string_view key, std::string_view value) |
| void | logArtifact (const std::filesystem::path &file, const std::string &name="") |
| Copy a file into artifacts/ (optionally under a relative name). | |
| void | appendRecord (std::string_view stream, const JsonRecord &record) |
| Append one JSON line to artifacts/STREAM_NAME.jsonl. | |
| void | flush () |
| Send buffered metrics, params and tags to the tracking server. | |
| void | finish (Status status) |
| const std::string & | runId () const noexcept |
| const std::string & | experimentId () const noexcept |
| const std::filesystem::path & | runDirectory () const noexcept |
| bool | streaming () const noexcept |
| std::string | identityJson () const |
Static Public Member Functions | |
| static std::unique_ptr< MlflowRun > | start (const Options &options) |
One MLflow run. It is written directly in the tracking file-store layout under a store directory (mlruns/EXPERIMENT_ID/RUN_ID/{meta.yaml, params,metrics,tags,artifacts}, readable by mlflow ui --backend-store-uri file://<store>), and streamed to a running tracking server when a tracking URI is given: the run is created there with the same id, metrics/params/tags go out in log-batch requests on flush(), and the record streams are uploaded as artifacts at finish() when the server proxies artifacts. Metrics carry a step; records are JSON lines appended to a named stream under artifacts/, for the vectors a post-mortem of the surrogate needs.
Definition at line 97 of file MlflowFileStore.h.
|
strong |
| Enumerator | |
|---|---|
| Running | |
| Finished | |
| Failed | |
| Killed | |
Definition at line 107 of file MlflowFileStore.h.
| gpr::track::MlflowRun::~MlflowRun | ( | ) |
Definition at line 576 of file MlflowFileStore.cpp.
|
delete |
| void gpr::track::MlflowRun::appendRecord | ( | std::string_view | stream, |
| const JsonRecord & | record ) |
Append one JSON line to artifacts/STREAM_NAME.jsonl.
Definition at line 679 of file MlflowFileStore.cpp.
|
inlinenodiscardnoexcept |
Definition at line 135 of file MlflowFileStore.h.
| void gpr::track::MlflowRun::finish | ( | Status | status | ) |
Definition at line 690 of file MlflowFileStore.cpp.
| void gpr::track::MlflowRun::flush | ( | ) |
Send buffered metrics, params and tags to the tracking server.
Definition at line 503 of file MlflowFileStore.cpp.
|
nodiscard |
The run's identity as JSON, for a caller that attaches later (the validation stage of a campaign runner).
Definition at line 720 of file MlflowFileStore.cpp.
| void gpr::track::MlflowRun::logArtifact | ( | const std::filesystem::path & | file, |
| const std::string & | name = "" ) |
Copy a file into artifacts/ (optionally under a relative name).
Definition at line 667 of file MlflowFileStore.cpp.
| void gpr::track::MlflowRun::logMetric | ( | std::string_view | key, |
| double | value, | ||
| long | step = 0 ) |
Definition at line 645 of file MlflowFileStore.cpp.
| void gpr::track::MlflowRun::logParam | ( | std::string_view | key, |
| double | value ) |
Definition at line 617 of file MlflowFileStore.cpp.
| void gpr::track::MlflowRun::logParam | ( | std::string_view | key, |
| long | value ) |
Definition at line 622 of file MlflowFileStore.cpp.
| void gpr::track::MlflowRun::logParam | ( | std::string_view | key, |
| std::string_view | value ) |
Definition at line 610 of file MlflowFileStore.cpp.
|
inlinenodiscardnoexcept |
Definition at line 139 of file MlflowFileStore.h.
|
inlinenodiscardnoexcept |
Definition at line 131 of file MlflowFileStore.h.
| void gpr::track::MlflowRun::setTag | ( | std::string_view | key, |
| std::string_view | value ) |
Definition at line 661 of file MlflowFileStore.cpp.
Nullptr when neither a store nor a tracking URI is given. Throws on an unwritable store; a server that cannot be reached disables streaming with a warning and the local store continues.
Definition at line 386 of file MlflowFileStore.cpp.
|
inlinenodiscardnoexcept |
Definition at line 143 of file MlflowFileStore.h.