Skip to content

Commit

Permalink
verbose=4 (#140)
Browse files Browse the repository at this point in the history
* verbose=4

* docstrings for verbose=4
  • Loading branch information
alexander-g committed Jan 18, 2021
1 parent 1e578e8 commit 56d4a4c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
3 changes: 3 additions & 0 deletions elegy/callbacks/progbar_logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,9 @@ def update(self, current, values=None, finalize=None):
elif self.verbose == 3:
self.compact_table_progress(current, finalize)

elif self.verbose == 4 and finalize:
self.compact_table_progress(current, finalize)

self._last_update = now

def add(self, n, values=None):
Expand Down
19 changes: 12 additions & 7 deletions elegy/model/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,10 +222,12 @@ def fit(
The model is not trained for a number of iterations
given by `epochs`, but merely until the epoch
of index `epochs` is reached.
verbose: 0, 1, 2 or 3. Verbosity mode.
0 = silent, 1 = progress bar, 2 = one line per epoch 3 = table.
Note that the progress bar is not particularly useful when
logged to a file, so verbose=2 is recommended when not running
verbose: 0, 1, 2, 3 or 4. Verbosity mode.
0 = silent, 1 = progress bar, 2 = one line per epoch,
3 = table with updates per step, 4 = table with updates per epoch.
Note: verbosity options 1 and 3 may slow down training
Note: the progress bar is not particularly useful when
logged to a file, so verbose=2 or verbose=4 is recommended when not running
interactively (eg, in a production environment).
callbacks: List of [elegy.callbacks.callback.Callback][] instances.
List of callbacks to apply during training.
Expand Down Expand Up @@ -475,8 +477,9 @@ def evaluate(
it could be either Numpy or Jax array(s).
It should be consistent with `x`. If `x` is a generator,
`y` should not be specified (since targets will be obtained from `x`).
verbose: 0, 1, or 2. Verbosity mode.
0 = silent, 1 = progress bar, 2 = one line per epoch.
verbose: 0, 1, 2, 3 or 4. Verbosity mode.
0 = silent, 1 = progress bar, 2 = one line per epoch
3 = table with updates per step, 4 = table with updates per epoch.
batch_size: Integer or `None`.
Number of samples per gradient update.
If unspecified, `batch_size` will default to 32.
Expand Down Expand Up @@ -588,7 +591,9 @@ def predict(
If unspecified, `batch_size` will default to 32.
Do not specify the `batch_size` if your data is in the
form of generators (since they generate batches).
verbose: Verbosity mode, 0 or 1.
verbose: Verbosity mode, 0, 1, 2, 3 or 4.
0 = silent, 1 = progress bar, 2 = one line per epoch
3 = table with updates per step, 4 = table with updates per epoch.
steps: Total number of steps (batches of samples)
before declaring the prediction round finished.
Ignored with the default value of `None`.
Expand Down

0 comments on commit 56d4a4c

Please sign in to comment.