Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

write_run_metadata

Write run metadata


Description

Record various types of training run metadata This function can be called even when a run directory isn't active (metadata will only be written if and when a run directory is initialized).

Usage

write_run_metadata(type, data, run_dir = NULL)

Arguments

type

Type of metadata to write. Standard types include "flags", "sources", "properties", "metrics", and "evaluation". You can also specify a custom type (see Custom Types section below).

data

Metadata to write:

  • "flags" — Named list of training flags

  • "source" — Directory to copy source files from

  • "properties" — Named list of arbitrary properties. Note that properties will be stored as strings.

  • "metrics" — Data frame with training run metrics (see Metrics Data Frame below).

  • "evaluation" — Named list of evaluation metrics.

  • "error" — Named list with 'message' and 'traceback'

  • "<custom>" – Function used to write the data (see Custom Types section below).

run_dir

Run directory to write metadata into (defaults to currently active run)

Metrics Data Frame

Metrics should be passed as a data frame with one column for each metric. If the metrics are not yet complete (e.g. only metrics for the first several epochs are provided) then metrics in yet to be completed epochs should use NA as their values. For example:

data.frame':	30 obs. of  4 variables:
$ loss    : num  0.423 0.201 NA NA NA ...
$ acc     : num  0.873 0.942 NA NA NA ...
$ val_loss: num  0.174 0.121 NA NA NA ...
$ val_acc : num  0.949 0.964 NA NA NA ...

If both metrics and validation metrics are provided, you should preface the name of the validation metric with "val_" (e.g. for a metric named "loss" provide validation metrics in "val_loss"). This indicates that the metrics are related which is useful e.g. when plotting metrics.

Custom Types

You can pass a type with an arbitary name along with a function that should be used to writes the data. The function will be passed a single data_dir argument. For example:

write_run_metadata("images", function(data_dir) {
  # write into data_dir here
})

Note

write_run_data() is deprecated and is provided as an alias for backward compatibility.


tfruns

Training Run Tools for 'TensorFlow'

v1.5.0
Apache License 2.0
Authors
Daniel Falbel [ctb, cre], JJ Allaire [aut], RStudio [cph, fnd], Mike Bostock [cph] (D3 library - https://d3js.org/), Masayuki Tanaka [cph] (C3 library - http://c3js.org/), jQuery Foundation [cph] (jQuery library), jQuery contributors [cph] (jQuery library; authors: inst/views/components/jquery-AUTHORS.txt), Shaun Bowe [cph] (jQuery visibilityChanged plugin), Materialize [cph] (Materizlize library - https://materializecss.com/), Yuxi You [cph] (Vue.js library - https://vuejs.org/), Kevin Decker [cph] (jsdiff library - https://github.com/kpdecker/jsdiff/), Rodrigo Fernandes [cph] (diff2html library - https://diff2html.xyz/), Ivan Sagalaev [cph] (highlight.js library - https://highlightjs.org/), Yauheni Pakala [cph] (highlightjs-line-numbers library)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.