Skip to contents

Flatten the execution graph captured in a SupervisedSession (from train()) into a timeline (Gantt) table: one row per recorded node, ordered as a depth-first walk of the execution tree, with start/end offsets in milliseconds from session start.

Usage

session_timeline(session)

Arguments

session

SupervisedSession: Session object, e.g. model@session.

Value

data.table with one row per node in depth-first order and columns:

  • label Character: Unique display label, indented two spaces per tree depth (duplicates disambiguated with " #<n>" suffixes).

  • start Numeric: Node start, milliseconds from session start.

  • end Numeric: Node end, milliseconds from session start.

  • kind Character: Node kind (e.g. "tune", "grid_cell", "train_alg").

  • status Character {"ok", "error", "aborted", "running"}: Node status.

  • failed Logical: TRUE when status is "error" or "aborted".

  • tip Character: Preformatted tooltip text ("name -- duration [status]").

Details

This is the single source of the tree-walk, labeling, and status logic for timeline renderers. rtemis.server consumes it for the job.result session slice, which the rtemislive web UI draws; pair it with session_kind_colors() to color bars by node kind.

Nodes that never closed (status "running" or "aborted" with no end time) are drawn up to the session finish time when known, else to the latest recorded node start.

Author

EDG

Examples

mod <- train(iris, hyperparameters = setup_CART())
#> 2026-10-20 09:08:06 
#> Checking data is ready for training...
#>  
#> ✔ 
#> [check_supervised]
#> 2026-10-20 09:08:06 
#> ▶
#>  [train]
#> 2026-10-20 09:08:06 
#> Training set: 150 cases x 4 features.
#>  [summarize_supervised]
#> 2026-10-20 09:08:06 
#> // CPU | future (mirai_multisession) | 7 workers: algorithm 1 thread, tuning 1, outer resampling 1
#>  [msg_resources]
#> 2026-10-20 09:08:06 
#> Shared memory (auto): not sharing training data (7.3 kB) -- this run transfers nothing to workers.
#>  [report_shared_memory]
#> 2026-10-20 09:08:06 
#> Training CART Classification...
#>  [train]
#> 2026-10-20 09:08:06 
#> Checking data is ready for training...
#>  
#> ✔ 
#> [check_supervised]
#> 
#> <Classification>
#> CART (CART decision tree (rpart))
#> 
#>   <Training Classification Metrics>
#>                      Predicted
#>           Reference  setosa  versicolor  virginica  
#>              setosa      50           0          0
#>          versicolor       0          47          3
#>           virginica       0           1         49
#> 
#>                      Overall  
#>   Balanced Accuracy  0.973  
#>                  F1  0.973  
#>            Accuracy  0.973  
#>                      Setosa  Versicolor  Virginica  
#>         Sensitivity  1.000   0.940       0.980    
#>         Specificity  1.000   0.990       0.970    
#>   Balanced Accuracy  1.000   0.965       0.975    
#>                 PPV  1.000   0.979       0.942    
#>                 NPV  1.000   0.971       0.990    
#>                  F1  1.000   0.959       0.961    
#> 
#> 2026-10-20 09:08:06 
#> Done in 0.02 seconds.
#>  [train]
# One row per recorded node, depth-first: the run, then the steps under it.
session_timeline(mod@session)
#>                        label     start       end      kind status failed
#>                       <char>     <num>     <num>    <char> <char> <lgcl>
#> 1: train CART Classification 0.4780293 12.068033     train     ok  FALSE
#> 2:            train_alg CART 4.4732094  6.736040 train_alg     ok  FALSE
#> 3:                   predict 6.7520142  7.548094   predict     ok  FALSE
#> 4:               varimp CART 7.6761246  7.916212    varimp     ok  FALSE
#> 5:                   metrics 7.9231262 11.793137   metrics     ok  FALSE
#>                                     tip
#>                                  <char>
#> 1: train CART Classification—12 ms [ok]
#> 2:             train_alg CART—2 ms [ok]
#> 3:                    predict—1 ms [ok]
#> 4:             varimp CART—<0.5 ms [ok]
#> 5:                    metrics—4 ms [ok]