<commit_before># Train Keras MLP example

The keras plugin supports a single `train` operation for Keras models
that it detects. We can use the `mnist_mlp` Keras example to
illustrate.

    >>> cd("examples/keras/mnist")

The keras plugin automatically adds a model checkpoint callback to
save model weights at each epoch. However, this callback requires the
`h5py` module, which isn't installed by default.

For our first training, we'll proceed without the `h5py` module.

    >>> run("guild run mnist_mlp:train -y --no-gpus epochs=1",
    ...     timeout=120, ignore="WARNING")
    Limiting available GPUs (CUDA_VISIBLE_DEVICES) to: <none>
    Using TensorFlow backend.
    60000 train samples
    10000 test samples
    _________________________________________________________________
    Layer (type)                 Output Shape              Param #
    =================================================================
    dense_1 (Dense)              (None, 512)               401920
    _________________________________________________________________
    dropout_1 (Dropout)          (None, 512)               0
    _________________________________________________________________
    dense_2 (Dense)              (None, 512)               262656
    _________________________________________________________________
    dropout_2 (Dropout)          (None, 512)               0
    _________________________________________________________________
    dense_3 (Dense)              (None, 10)                5130
    =================================================================
    Total params: 669,706
    Trainable params: 669,706
    Non-trainable params: 0
    _________________________________________________________________
    Train on 60000 samples, validate on 10000 samples...
    Epoch 1/1
    <BLANKLINE>
    ...
    Test loss: ...
    Test accuracy: ...
    <exit 0>

Note the warning from the keras plugin.
<commit_msg>Bump timeout for keras mlp test<commit_after># Train Keras MLP example

The keras plugin supports a single `train` operation for Keras models
that it detects. We can use the `mnist_mlp` Keras example to
illustrate.

    >>> cd("examples/keras/mnist")

The keras plugin automatically adds a model checkpoint callback to
save model weights at each epoch. However, this callback requires the
`h5py` module, which isn't installed by default.

For our first training, we'll proceed without the `h5py` module.

    >>> run("guild run mnist_mlp:train -y --no-gpus epochs=1",
    ...     timeout=180, ignore="WARNING")
    Limiting available GPUs (CUDA_VISIBLE_DEVICES) to: <none>
    Using TensorFlow backend.
    60000 train samples
    10000 test samples
    _________________________________________________________________
    Layer (type)                 Output Shape              Param #
    =================================================================
    dense_1 (Dense)              (None, 512)               401920
    _________________________________________________________________
    dropout_1 (Dropout)          (None, 512)               0
    _________________________________________________________________
    dense_2 (Dense)              (None, 512)               262656
    _________________________________________________________________
    dropout_2 (Dropout)          (None, 512)               0
    _________________________________________________________________
    dense_3 (Dense)              (None, 10)                5130
    =================================================================
    Total params: 669,706
    Trainable params: 669,706
    Non-trainable params: 0
    _________________________________________________________________
    Train on 60000 samples, validate on 10000 samples...
    Epoch 1/1
    <BLANKLINE>
    ...
    Test loss: ...
    Test accuracy: ...
    <exit 0>

Note the warning from the keras plugin.

{'fraction_non_alphanumeric': 0.12442631310555839, 'fraction_numerical': 0.04028556858745538, 'mean_word_length': 2.986788617886179, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3422001', 'n_tokens_mistral': 1009, 'n_tokens_neox': 864, 'n_words': 311}