log_artifact: Log Artifact

View source: R/runs.R

log_artifactR Documentation

Log Artifact

Description

Logs a specific file or directory as an artifact for a run. Modeled after aws.s3::s3write_using

Usage

log_artifact(
  x,
  FUN,
  filename,
  run_id,
  client = mlflow_client(),
  pause_base = 0.5,
  max_times = 5,
  pause_cap = 60,
  ...
)

## Default S3 method:
log_artifact(
  x,
  FUN = saveRDS,
  filename,
  run_id = get_active_run_id(),
  client = mlflow_client(),
  pause_base = 0.5,
  max_times = 5,
  pause_cap = 60,
  ...
)

## S3 method for class 'ggplot'
log_artifact(
  x,
  FUN,
  filename,
  run_id = get_active_run_id(),
  client = mlflow_client(),
  pause_base = 0.5,
  max_times = 5,
  pause_cap = 60,
  ...
)

Arguments

x

The object to log as an artifact

FUN

the function to use to save the artifact

filename

the name of the file to save

run_id

A run uuid. Automatically inferred if a run is currently active.

client

An MLFlow client. Auto-generated if not provided

pause_base, max_times, pause_cap

See insistently

...

Additional arguments to pass to aws.s3::s3write_using

Details

When logging to Amazon S3, ensure that you have the s3:PutObject, s3:GetObject, s3:ListBucket, and s3:GetBucketLocation permissions on your bucket.

Additionally, at least the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables must be set to the corresponding key and secrets provided by Amazon IAM.

Value

The path to the file, invisibly


collegevine/lightMLFlow documentation built on Jan. 16, 2024, 5:52 a.m.