Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new feature for profiling training runs #782

Merged
merged 24 commits into from
Feb 7, 2020
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion pytorch_lightning/trainer/trainer.py
Original file line number Diff line number Diff line change
@@ -469,11 +469,18 @@ def __init__(

# default used by the Trainer
trainer = Trainer(profiler=None)

# to profile using the defaults
trainer = Trainer(profiler=True)

# profile a training run and get a report on completion of the training job
# profile main parts of a training run
profiler = utilities.Profiler()
trainer = Trainer(profiler=profiler)

# advanced profiler for function-level stats
profiler = utilities.AdvancedProfiler()
trainer = Trainer(profiler=profiler)

.. warning:: Following arguments become deprecated and they will be removed in v0.8.0:

- `nb_sanity_val_steps`