flambe icon indicating copy to clipboard operation
flambe copied to clipboard

Richer debug mode

Open cle-ros opened this issue 5 years ago • 1 comments

The debug mode is already very useful in its current state. However, it would be great if it was extended to include the following features:

  • adding a parameter in the config.yaml that will only load the first k% of the data (i.e., only load a small part from disk). This will make debugging much faster, as the model's forward call will be triggered much earlier
  • adding debugging overrides for parameters in the config.yaml, such as debugging-specific dimensionalities that could be much smaller, allowing for faster load time and the use of smaller GPUs.
  • when a cluster.yaml is specified, it would make sense to issue an early warning, but otherwise disable debug mode and proceed normally. This would override this issue.

Possible solutions:

First solution:

  • add a --debug parameter to the runner/run.py / flambe scripts that triggers debug mode instead of setting the mode via the config
  • then have a "debug" section in the config.yaml that can override each parameter OR
  • have a --debug-file parameter that enables debug mode and takes the overrides from a 2nd file

Second solution: Add a special character combination (like !g) that allows you to set two values in the config.yaml, where the first is for non-debug mode, and the second is for debug mode. E.g.:

model: !RNN
    hidden_dim: !d [600, 100]
    num_layers: !d [4, 1]

would set the hidden dim to 100 and the num layers to 1 in debug mode.

cle-ros avatar Dec 02 '19 15:12 cle-ros

model: !RNN
    hidden_dim: !d [600, 100]
    num_layers: !d [4, 1]

This is an awesome idea

iitzco-asapp avatar Dec 03 '19 13:12 iitzco-asapp