flambe
flambe copied to clipboard
Richer debug mode
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 therunner/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.
model: !RNN
hidden_dim: !d [600, 100]
num_layers: !d [4, 1]
This is an awesome idea