Shortcuts

Examples

Example Models

The Determined distribution contains several example experiments in the examples/ subdirectory. Each experiment consists of a single model definition and one or more experiment configurations.

Framework

Dataset

PyTorch

MNIST

PyTorch

CIFAR-10

TensorFlow (Estimator API)

Fashion MNIST

TensorFlow (tf.keras)

CIFAR-10 CNN

TensorBoard Integration

This example shows how to use Determined with TensorBoard to visualize training and/or validation metrics.

To configure TensorBoard with Determined, follow these steps:

  1. Set up a directory on a shared file system for TensorBoard event files, e.g. /mnt/tensorboard. All agents must be able to write to this directory.

  2. Add an entry to the experiment config to ensure that the shared directory is mounted into each trial container. In this example, we use /tensorboard as the container path:

    bind_mounts:
      - host_path: /mnt/tensorboard
        container_path: /tensorboard
    
  3. Implement the callbacks() interface in your model definition. Use your container_path (/tensorboard in this example) as the log_directory argument.

    from determined.estimator import TFEventWriter
    
    class MNISTTrial(EstimatorTrial):
       ...
       def callbacks(self, hparams):
           return TFEventWriter("/tensorboard")
       ...
    
  4. Start TensorBoard using the host_path from step 2 to view the experiment metrics as the experiment is running or after it has ended.

    tensorboard --logdir=/mnt/tensorboard