class gpr::track::MlflowRestClient

Overview

A plain HTTP/1.1 client over a POSIX socket for the MLflow REST API (`http://host:port <http://host:port>`__[/prefix]). More…

#include <gpr/auxiliary/MlflowFileStore.h>
 
class MlflowRestClient {
public:
    // structs
 
    struct Response;
 
    // construction
 
    MlflowRestClient(std::string_view tracking_uri, double timeout_seconds);
 
    // methods
 
    Response post(const std::string& path, const std::string& json) const;
    Response put(const std::string& path, const std::string& body, const std::string& content_type) const;
    Response get(const std::string& path) const;
    const std::string& host() const;
    int port() const;
    const std::string& prefix() const;
};

Detailed Documentation

A plain HTTP/1.1 client over a POSIX socket for the MLflow REST API (`http://host:port <http://host:port>`__[/prefix]). No TLS: a tracking server on a login node or a tunnel is reached in the clear, which is how mlflow server listens by default.

Construction

MlflowRestClient(std::string_view tracking_uri, double timeout_seconds)

Throws std::invalid_argument on a URI that is not plain http.