response

package
v0.5.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 5, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateExperimentResponse

type CreateExperimentResponse struct {
	ID string `json:"experiment_id"`
}

CreateExperimentResponse is a response object for `POST /mlflow/experiments/create` endpoint.

func NewCreateExperimentResponse

func NewCreateExperimentResponse(experiment *models.Experiment) *CreateExperimentResponse

NewCreateExperimentResponse creates new CreateExperimentResponse object.

type CreateRunResponse

type CreateRunResponse struct {
	Run RunPartialResponse `json:"run"`
}

CreateRunResponse is a response object for `POST mlflow/runs/create` endpoint.

func NewCreateRunResponse

func NewCreateRunResponse(run *models.Run) *CreateRunResponse

NewCreateRunResponse creates new instance of CreateRunResponse object.

type ExperimentPartialResponse

type ExperimentPartialResponse struct {
	ID               string                         `json:"experiment_id"`
	Name             string                         `json:"name"`
	ArtifactLocation string                         `json:"artifact_location"`
	LifecycleStage   string                         `json:"lifecycle_stage"`
	LastUpdateTime   int64                          `json:"last_update_time"`
	CreationTime     int64                          `json:"creation_time"`
	Tags             []ExperimentTagPartialResponse `json:"tags"`
}

ExperimentPartialResponse is a partial response object for different responses.

func NewExperimentPartialResponse

func NewExperimentPartialResponse(experiment *models.Experiment) *ExperimentPartialResponse

NewExperimentPartialResponse is a helper function for NewExperimentResponse and NewSearchExperimentsResponse functions, because the use almost the same response structure.

type ExperimentTagPartialResponse

type ExperimentTagPartialResponse struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

ExperimentTagPartialResponse is a partial response object for different responses.

type FilePartialResponse

type FilePartialResponse struct {
	Path     string `json:"path"`
	IsDir    bool   `json:"is_dir"`
	FileSize int64  `json:"file_size"`
}

FilePartialResponse is a partial response object for different responses.

type GetExperimentResponse

type GetExperimentResponse struct {
	Experiment *ExperimentPartialResponse `json:"experiment"`
}

GetExperimentResponse is a response object for `GET /mlflow/experiments/get` endpoint.

func NewExperimentResponse

func NewExperimentResponse(experiment *models.Experiment) *GetExperimentResponse

NewExperimentResponse creates new GetExperimentResponse object.

type GetMetricHistoryBulkResponse

type GetMetricHistoryBulkResponse struct {
	Metrics []MetricPartialResponseBulk `json:"metrics"`
}

GetMetricHistoryBulkResponse is a response object for `GET mlflow/metrics/get-history-bulk` endpoint.

func NewMetricHistoryBulkResponse

func NewMetricHistoryBulkResponse(metrics []models.Metric) *GetMetricHistoryBulkResponse

NewMetricHistoryBulkResponse creates new GetMetricHistoryBulkResponse object.

type GetMetricHistoryResponse

type GetMetricHistoryResponse struct {
	Metrics []MetricPartialResponse `json:"metrics"`
}

GetMetricHistoryResponse is a response object for `GET mlflow/metrics/get-history` endpoint.

func NewMetricHistoryResponse

func NewMetricHistoryResponse(metrics []models.Metric) (*GetMetricHistoryResponse, error)

NewMetricHistoryResponse creates new GetMetricHistoryResponse object.

type GetRunResponse

type GetRunResponse struct {
	Run *RunPartialResponse `json:"run"`
}

GetRunResponse is a response object for `GET mlflow/runs/get` endpoint.

func NewGetRunResponse

func NewGetRunResponse(run *models.Run) *GetRunResponse

NewGetRunResponse creates new GetRunResponse object.

type ListArtifactsResponse

type ListArtifactsResponse struct {
	Files   []FilePartialResponse `json:"files"`
	RootURI string                `json:"root_uri"`
}

ListArtifactsResponse is a response object for `GET mlflow/artifacts/list` endpoint.

func NewListArtifactsResponse added in v0.3.0

func NewListArtifactsResponse(
	rootURI string, artifacts []storage.ArtifactObject,
) *ListArtifactsResponse

NewListArtifactsResponse creates new instance of ListArtifactsResponse.

type MetricPartialResponse

type MetricPartialResponse struct {
	RunID     string         `json:"run_id,omitempty"`
	Key       string         `json:"key"`
	Value     any            `json:"value"`
	Timestamp int64          `json:"timestamp"`
	Step      int64          `json:"step"`
	Context   map[string]any `json:"context"`
}

MetricPartialResponse is a partial response object for GetMetricHistoryResponse.

type MetricPartialResponseBulk added in v0.5.0

type MetricPartialResponseBulk struct {
	RunID     string `json:"run_id,omitempty"`
	Key       string `json:"key"`
	Value     any    `json:"value"`
	Timestamp int64  `json:"timestamp"`
	Step      int64  `json:"step"`
}

MetricPartialResponseBulk is a partial response object for GetMetricHistoryBulkResponse.

type RunDataPartialResponse

type RunDataPartialResponse struct {
	Metrics []RunMetricPartialResponse `json:"metrics,omitempty"`
	Params  []RunParamPartialResponse  `json:"params,omitempty"`
	Tags    []RunTagPartialResponse    `json:"tags,omitempty"`
}

RunDataPartialResponse is a partial response object for different responses.

type RunInfoPartialResponse

type RunInfoPartialResponse struct {
	ID             string `json:"run_id"`
	UUID           string `json:"run_uuid"`
	Name           string `json:"run_name"`
	ExperimentID   string `json:"experiment_id"`
	UserID         string `json:"user_id,omitempty"`
	Status         string `json:"status"`
	StartTime      int64  `json:"start_time"`
	EndTime        int64  `json:"end_time,omitempty"`
	ArtifactURI    string `json:"artifact_uri,omitempty"`
	LifecycleStage string `json:"lifecycle_stage"`
}

RunInfoPartialResponse is a partial response object for different responses.

type RunMetricPartialResponse

type RunMetricPartialResponse struct {
	Key       string `json:"key"`
	Value     any    `json:"value"`
	Timestamp int64  `json:"timestamp"`
	Step      int64  `json:"step"`
}

RunMetricPartialResponse is a partial response object for different responses.

type RunParamPartialResponse

type RunParamPartialResponse struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

RunParamPartialResponse is a partial response object for different responses.

type RunPartialResponse

type RunPartialResponse struct {
	Info RunInfoPartialResponse `json:"info"`
	Data RunDataPartialResponse `json:"data"`
}

RunPartialResponse is a partial response object for different responses.

func NewRunPartialResponse

func NewRunPartialResponse(run *models.Run) *RunPartialResponse

NewRunPartialResponse is a helper function for NewSearchRunsResponse and NewGetRunResponse functions, because the use almost the same response structure.

type RunTagPartialResponse

type RunTagPartialResponse struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

RunTagPartialResponse is a partial response object for different responses.

type SearchExperimentsResponse

type SearchExperimentsResponse struct {
	Experiments   []*ExperimentPartialResponse `json:"experiments"`
	NextPageToken string                       `json:"next_page_token,omitempty"`
}

SearchExperimentsResponse is a response object for `GET /mlflow/experiments/search` endpoint.

func NewSearchExperimentsResponse

func NewSearchExperimentsResponse(
	experiments []models.Experiment, limit, offset int,
) (*SearchExperimentsResponse, error)

NewSearchExperimentsResponse creates new SearchExperimentsResponse object.

type SearchRunsResponse

type SearchRunsResponse struct {
	Runs          []*RunPartialResponse `json:"runs"`
	NextPageToken string                `json:"next_page_token,omitempty"`
}

SearchRunsResponse is a response object for `POST mlflow/runs/search` endpoint.

func NewSearchRunsResponse

func NewSearchRunsResponse(runs []models.Run, limit, offset int) (*SearchRunsResponse, error)

NewSearchRunsResponse creates new SearchRunsResponse object.

type UpdateRunResponse

type UpdateRunResponse struct {
	RunInfo RunInfoPartialResponse `json:"run_info"`
}

UpdateRunResponse is a response object for `POST mlflow/runs/update` endpoint.

func NewUpdateRunResponse

func NewUpdateRunResponse(run *models.Run) *UpdateRunResponse

NewUpdateRunResponse creates new UpdateRunResponse object.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL