Shortcuts

Profiler

class lightning.pytorch.profilers.Profiler(dirpath=None, filename=None)[소스]

기반 클래스: abc.ABC

If you wish to write a custom profiler, you should inherit from this class.

describe()[소스]

Logs a profile report after the conclusion of run.

반환 형식

None

profile(action_name)[소스]

Yields a context manager to encapsulate the scope of a profiled action.

Example:

with self.profile('load training data'):
    # load training data code

The profiler will start once you’ve entered the context and will automatically stop once you exit the code block.

반환 형식

Generator

setup(stage, local_rank=None, log_dir=None)[소스]

Execute arbitrary pre-profiling set-up steps.

반환 형식

None

abstract start(action_name)[소스]

Defines how to start recording an action.

반환 형식

None

abstract stop(action_name)[소스]

Defines how to record the duration once an action is complete.

반환 형식

None

teardown(stage)[소스]

Execute arbitrary post-profiling tear-down steps.

Closes the currently open file and stream.

반환 형식

None