Logged data

Parameters, metrics, and artifact resources recorded against an iteration or experiment.

Parameters

DearDiary.get_parameterFunction
get_parameter(id::Integer)::Optional{Parameter}

Get a Parameter by id.

Arguments

  • id::Integer: The id of the parameter to query.

Returns

A Parameter object. If the record does not exist, return nothing.

source
get_parameter(client::Client, id::Integer)::Optional{Parameter}

Fetch a Parameter via GET /parameter/{id}. Returns nothing when the server replies 404 and raises ClientError for other failures.

source
DearDiary.get_parametersFunction
get_parameters(iteration_id::Integer)::Array{Parameter, 1}

Get all Parameter for a given iteration.

Arguments

  • iteration_id::Integer: The id of the iteration to query.

Returns

An array of Parameter objects.

source
get_parameters(iteration_id::Integer, page::Pagination)::PaginatedResponse{Parameter}

Get a page of Parameter records for an iteration, with total count populated.

Arguments

  • iteration_id::Integer: The id of the iteration to query.
  • page::Pagination: The page bounds (limit + offset).

Returns

A PaginatedResponse of Parameter.

source
get_parameters(client::Client, iteration_id::Integer)::Array{Parameter,1}

Returns the first page (default limit) of Parameter records under iteration_id, discarding the pagination envelope.

source
get_parameters(client::Client, iteration_id::Integer, page::Pagination)::PaginatedResponse{Parameter}

Fetch a page of Parameter records under iteration_id via GET /parameter/iteration/{iteration_id}?limit=…&offset=….

source
DearDiary.create_parameterFunction
create_parameter(iteration_id::Integer, key::AbstractString, value::AbstractString)::NamedTuple{id::Optional{<:Int64},status::DataType}

Create a Parameter.

Arguments

  • iteration_id::Integer: The id of the iteration to create the parameter for.
  • key::AbstractString: The key of the parameter.
  • value::AbstractString: The value of the parameter.

Returns

  • The created parameter ID. If an error occurs, nothing is returned.
  • An UpsertResult. Created if the record was successfully created, Duplicate if the record already exists, Unprocessable if the record violates a constraint, and Error if an error occurred while creating the record.
source
create_parameter(iteration_id::Integer, key::AbstractString, value::Real)::NamedTuple{id::Optional{<:Int64},status::DataType}

Create a Parameter.

Arguments

  • iteration_id::Integer: The id of the iteration to create the parameter for.
  • key::AbstractString: The key of the parameter.
  • value::Real: The value of the parameter.

Returns

  • The created parameter ID. If an error occurs, nothing is returned.
  • An UpsertResult. Created if the record was successfully created, Duplicate if the record already exists, Unprocessable if the record violates a constraint, and Error if an error occurred while creating the record.
source
create_parameter(client::Client, iteration_id::Integer, key::AbstractString, value::AbstractString)::Int64

Append a Parameter (string-valued) to iteration_id via POST /parameter/iteration/{iteration_id}. The parent iteration must not be terminated; the server rejects writes to ended iterations. Returns the new parameter id.

source
create_parameter(client::Client, iteration_id::Integer, key::AbstractString, value::Real)::Int64

Real-typed overload of create_parameter; stringifies value before sending so numeric hyperparameters round-trip through the underlying TEXT column unchanged.

source
DearDiary.update_parameterFunction
update_parameter(id::Integer, key::Optional{AbstractString}, value::Optional{AbstractString})::Type{<:UpsertResult}

Update a Parameter record.

Arguments

  • id::Integer: The id of the parameter to update.
  • key::Optional{AbstractString}: The new key for the parameter.
  • value::Optional{AbstractString}: The new value for the parameter.

Returns

An UpsertResult. Updated if the record was successfully updated (or no changes were made), Duplicate if the record already exists, Unprocessable if the record violates a constraint, and Error if an error occurred while creating the record.

source
update_parameter(id::Integer, key::Optional{AbstractString}, value::Real)::Type{<:UpsertResult}

Update a Parameter record.

Arguments

  • id::Integer: The id of the parameter to update.
  • key::Optional{AbstractString}: The new key for the parameter.
  • value::Real: The new value for the parameter.

Returns

An UpsertResult. Updated if the record was successfully updated (or no changes were made), Duplicate if the record already exists, Unprocessable if the record violates a constraint, and Error if an error occurred while creating the record.

source
update_parameter(client::Client, id::Integer; key=nothing, value=nothing)::Nothing

Patch a Parameter via PATCH /parameter/{id}. Any keyword left as nothing is left untouched. Fails when the parent iteration has already been ended.

source
update_parameter(client::Client, id::Integer, value::Real; key=nothing)::Nothing

Real-typed overload of update_parameter; stringifies value before sending.

source
DearDiary.delete_parameterFunction
delete_parameter(id::Integer)::Bool

Delete a Parameter record.

Arguments

  • id::Integer: The id of the parameter to delete.

Returns

true if the record was successfully deleted, false otherwise.

source
delete_parameter(client::Client, id::Integer)::Nothing

Delete a Parameter via DELETE /parameter/{id}. Requires DeletePermission on the iteration's project.

source

Metrics

DearDiary.get_metricFunction
get_metric(id::Integer)::Optional{Metric}

Get a Metric by id.

Arguments

  • id::Integer: The id of the metric to query.

Returns

A Metric object. If the record does not exist, return nothing.

source
get_metric(client::Client, id::Integer)::Optional{Metric}

Fetch a Metric via GET /metric/{id}. Returns nothing when the server replies 404 and raises ClientError for other failures.

source
DearDiary.get_metricsFunction
get_metrics(iteration_id::Integer)::Array{Metric, 1}

Get all Metric for a given iteration, ordered by step ascending so the rows already form a chronological time series.

Arguments

  • iteration_id::Integer: The id of the iteration to query.

Returns

An array of Metric objects.

source
get_metrics(iteration_id::Integer, page::Pagination)::PaginatedResponse{Metric}

Get a page of Metric records for an iteration, with total count populated.

Arguments

  • iteration_id::Integer: The id of the iteration to query.
  • page::Pagination: The page bounds (limit + offset).

Returns

A PaginatedResponse of Metric.

source
get_metrics(client::Client, iteration_id::Integer)::Array{Metric,1}

Returns the first 50 Metric rows for iteration_id, ordered by step ascending.

source
get_metrics(client::Client, iteration_id::Integer, page::Pagination)::PaginatedResponse{Metric}

Fetch a page of Metric records under iteration_id via GET /metric/iteration/{iteration_id}?limit=…&offset=….

source
DearDiary.create_metricFunction
create_metric(iteration_id::Integer, key::AbstractString, value::AbstractFloat; step=nothing, recorded_at=nothing)::NamedTuple{id::Optional{<:Int64},status::DataType}

Create a Metric.

Arguments

  • iteration_id::Integer: The id of the iteration to create the metric for.
  • key::AbstractString: The key of the metric.
  • value::AbstractFloat: The value of the metric.
  • step::Optional{Integer}: Position in the time series. When nothing, the next max(step) + 1 value for the (iteration_id, key) series is used.
  • recorded_at::Optional{DateTime}: When the value was captured. When nothing, the server clock (now()) is used.

Returns

  • The created metric ID. If an error occurs, nothing is returned.
  • An UpsertResult. Created if the record was successfully created, Duplicate if the record already exists, Unprocessable if the record violates a constraint, and Error if an error occurred while creating the record.
source
create_metric(client::Client, iteration_id::Integer, key::AbstractString, value::Real; step=nothing, recorded_at=nothing)::Int64

Append a Metric to iteration_id via POST /metric/iteration/{iteration_id}.

Pass step=epoch to position the value in the time series; omit it and the server picks max(step) + 1 for the (iteration_id, key) series. recorded_at defaults to the server clock when omitted. The parent iteration must not be terminated.

source
DearDiary.log_metricsFunction
log_metrics(iteration_id::Integer, metrics::AbstractDict{<:AbstractString,<:AbstractFloat}; step=nothing, recorded_at=nothing)::NamedTuple{ids::Array{Int64,1},status::DataType}

Record many metric values against iteration_id in one shot. Every entry shares the same recorded_at (server clock when nothing). When step is omitted, each key independently gets its own max(step) + 1, so per-key counters do not interfere.

Stops at the first failure and returns the ids committed before the failure plus the failing status; callers can then decide whether to retry or surface the error.

Arguments

  • iteration_id::Integer: The id of the iteration to record against.
  • metrics::AbstractDict: The key => value pairs to record.
  • step::Optional{Integer}: Shared step for every entry, or nothing to let each key get its own next value.
  • recorded_at::Optional{DateTime}: Shared timestamp, or nothing for now().

Returns

  • ids::Array{Int64,1}: The ids of the inserted Metric rows in iteration order.
  • status::DataType: Created when every insert succeeded; otherwise the UpsertResult of the first failing insert.
source
log_metrics(client::Client, iteration_id::Integer, metrics::AbstractDict{<:AbstractString,<:Real}; step=nothing, recorded_at=nothing)::Array{Int64,1}

Record many metric values at once via POST /metric/iteration/{iteration_id}/batch. Cuts N HTTP round-trips per epoch to one. When step is omitted, each key independently gets its own max(step) + 1 server-side, so per-key counters do not interfere.

log_metrics(
    client, iter.id,
    Dict("loss" => 0.31, "acc" => 0.94, "val_loss" => 0.42);
    step=epoch,
)

Returns the ids of the inserted metrics in the order they were processed.

source
DearDiary.update_metricFunction
update_metric(id::Integer, key::Optional{AbstractString}, value::Optional{AbstractFloat}; step=nothing, recorded_at=nothing)::Type{<:UpsertResult}

Update a Metric record.

Arguments

  • id::Integer: The id of the metric to update.
  • key::Optional{AbstractString}: The new key for the metric.
  • value::Optional{AbstractFloat}: The new value for the metric.
  • step::Optional{Integer}: The new step in the series.
  • recorded_at::Optional{DateTime}: The new timestamp.

Returns

An UpsertResult. Updated if the record was successfully updated (or no changes were made), Duplicate if the record already exists, Unprocessable if the record violates a constraint, and Error if an error occurred while creating the record.

source
update_metric(client::Client, id::Integer; key=nothing, value=nothing, step=nothing, recorded_at=nothing)::Nothing

Patch a Metric via PATCH /metric/{id}. Any keyword left as nothing is left untouched server-side. The owning iteration must not be terminated.

source
DearDiary.delete_metricFunction
delete_metric(id::Integer)::Bool

Delete a Metric record.

Arguments

  • id::Integer: The id of the metric to delete.

Returns

true if the record was successfully deleted, false otherwise.

source
delete_metric(client::Client, id::Integer)::Nothing

Delete a Metric via DELETE /metric/{id}. Requires DeletePermission on the iteration's project.

source

Resources

DearDiary.get_resourceFunction
get_resource(id::Integer)::Optional{Resource}

Get a Resource by id.

Arguments

  • id::Integer: The id of the resource to query.

Returns

A Resource object. If the record does not exist, return nothing.

source
get_resource(client::Client, id::Integer)::Optional{Resource}

Fetch the metadata for a Resource via GET /resource/{id}. The returned struct's data field is always nothing; the JSON response carries metadata only. Fetch the artifact bytes separately with read_resource_data.

Returns nothing when the server replies 404 and raises ClientError for other failures.

source
DearDiary.get_resourcesFunction
get_resources(experiment_id::Integer)::Array{Resource, 1}

Get all Resource for a given experiment.

Arguments

  • experiment_id::Integer: The id of the experiment to query.

Returns

An array of Resource objects.

source
get_resources(experiment_id::Integer, page::Pagination)::PaginatedResponse{Resource}

Get a page of Resource records for an experiment, with total count populated.

Arguments

  • experiment_id::Integer: The id of the experiment to query.
  • page::Pagination: The page bounds (limit + offset).

Returns

A PaginatedResponse of Resource.

source
get_resources(client::Client, experiment_id::Integer)::Array{Resource,1}

Returns the first page (default limit) of Resource records under experiment_id, discarding the pagination envelope.

source
get_resources(client::Client, experiment_id::Integer, page::Pagination)::PaginatedResponse{Resource}

Fetch a page of Resource records under experiment_id via GET /resource/experiment/{experiment_id}?limit=…&offset=….

source
DearDiary.create_resourceFunction
create_resource(experiment_id::Integer, name::AbstractString, data::AbstractArray{UInt8,1})::NamedTuple{id::Optional{<:Int64},status::DataType}

Create a new Resource record.

Arguments

  • experiment_id::Integer: The id of the experiment to create the resource for.
  • name::AbstractString: The name of the resource.
  • data::AbstractArray{UInt8,1}: The binary data of the resource.

Returns

  • The created resource ID. If an error occurs, nothing is returned.
  • An UpsertResult. Created if the record was successfully created, Duplicate if the record already exists, Unprocessable if the record violates a constraint, and Error if an error occurred while creating the record.
source
create_resource(client::Client, experiment_id::Integer, name::AbstractString, data::AbstractVector{UInt8})::Int64

Upload a binary Resource to experiment_id via POST /resource/experiment/{experiment_id} as multipart/form-data. The parent experiment must be IN_PROGRESS. Returns the new resource id.

source
create_resource(client::Client, experiment_id::Integer, file_path::AbstractString)::Int64

Reads bytes from file_path and uploads them under the file's base name. The local API has no file-path overload; this helper exists only on the client.

source
DearDiary.update_resourceFunction
update_resource(id::Integer, name::Optional{AbstractString}, description::Optional{AbstractString}, data::Optional{AbstractArray{UInt8,1}})::Type{<:UpsertResult}

Update a Resource record.

Arguments

  • id::Integer: The id of the resource to update.
  • name::Optional{AbstractString}: The new name for the resource.
  • description::Optional{AbstractString}: The new description for the resource.
  • data::Optional{AbstractArray{UInt8,1}}: The new binary data for the resource.

Returns

An UpsertResult. Updated if the record was successfully updated (or no changes were made), Duplicate if the record already exists, Unprocessable if the record violates a constraint, and Error if an error occurred while creating the record.

source
update_resource(client::Client, id::Integer; name=nothing, description=nothing, data=nothing)::Nothing

Patch a Resource via PATCH /resource/{id} as multipart/form-data. Any keyword left as nothing is omitted from the multipart body, so partial updates work.

source
DearDiary.delete_resourceFunction
delete_resource(id::Integer)::Bool

Delete a Resource record. For non-inline backends the underlying artifact bytes are removed from the store first; inline-backed rows take their bytes down with the row.

Arguments

  • id::Integer: The id of the resource to delete.

Returns

true if the record was successfully deleted, false otherwise.

source
delete_resource(client::Client, id::Integer)::Nothing

Delete a Resource via DELETE /resource/{id}. Requires DeletePermission on the experiment's project.

source
DearDiary.read_resource_dataFunction
read_resource_data(id::Integer)::Optional{Vector{UInt8}}

Return the raw bytes of the Resource identified by id, fetching them from the configured backend. For inline-backed rows this returns resource.data; for external backends it dereferences resource.uri through the trait. Returns nothing when the row does not exist.

source
read_resource_data(client::Client, id::Integer)::Optional{Vector{UInt8}}

Download the raw bytes of a Resource via GET /resource/{id}/data. Returns the full body as a Vector{UInt8}, or nothing when the resource does not exist. The endpoint is backend-agnostic: inline-backed rows hand back the inline bytes, filesystem-backed rows stream from disk, and S3-backed rows are proxied through the object store.

source