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

Runner profiler update #1348

Merged
merged 29 commits into from
Nov 23, 2021
Merged
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
51f0f47
profiler is added to runner
asteyo Nov 6, 2021
cb5b4ea
profiler minimal example import fix
asteyo Nov 8, 2021
de4c5f4
runner docs updated
asteyo Nov 8, 2021
aad700a
logdir added to profiler
asteyo Nov 8, 2021
0fc2564
tensorboard_path fix
asteyo Nov 8, 2021
95e5ade
runner profiler callback updated
asteyo Nov 11, 2021
a2b3f00
Merge branch 'master' into runner_profiler_update
asteyo Nov 11, 2021
51a899d
fix codestyle
asteyo Nov 11, 2021
b54db88
Merge branch 'runner_profiler_update' of https://github.com/asteyo/ca…
asteyo Nov 11, 2021
c015c1c
Merge branch 'master' into runner_profiler_update
asteyo Nov 11, 2021
5b6ed80
key_loader fix
asteyo Nov 11, 2021
5cefd03
Merge branch 'runner_profiler_update' of https://github.com/asteyo/ca…
asteyo Nov 11, 2021
d4d3b81
profiler_kwargs fix
asteyo Nov 11, 2021
64715ef
profiler updated
asteyo Nov 11, 2021
7db8df5
profiler on_experiment_start method refactoring
asteyo Nov 11, 2021
5f16fed
logs path fixed
asteyo Nov 11, 2021
bd03a44
Revert "logs path fixed"
asteyo Nov 11, 2021
45fc5b6
profiler test is added
asteyo Nov 21, 2021
1d69e8c
flake8 update
asteyo Nov 21, 2021
65e831b
Merge branch 'master' into runner_profiler_update
asteyo Nov 21, 2021
a8c4ea7
profiler availability check is added
asteyo Nov 22, 2021
64b390e
profiler reqs is added
asteyo Nov 22, 2021
506ee23
Merge branch 'runner_profiler_update' of https://github.com/asteyo/ca…
asteyo Nov 22, 2021
f6c2d67
setup docs updated
asteyo Nov 22, 2021
023d398
codestyle fix
asteyo Nov 22, 2021
dc6371a
dl_cpu.yml refactoring
asteyo Nov 22, 2021
028c407
Revert "dl_cpu.yml refactoring"
asteyo Nov 22, 2021
9e0fe35
profiler added to dl_cpu.yml
asteyo Nov 22, 2021
fca5fef
Merge branch 'master' into runner_profiler_update
asteyo Nov 22, 2021
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
14 changes: 13 additions & 1 deletion catalyst/runners/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,19 @@ def get_callbacks(self, stage: str) -> "OrderedDict[str, Callback]":
callbacks["_overfit"] = BatchOverfitCallback()
if self._profile and not is_callback_exists(ProfilerCallback):
callbacks["_profile"] = ProfilerCallback(
tensorboard_path=os.path.join(self._logdir, "tb_profile")
tensorboard_path=os.path.join(self._logdir, "tb_profile"),
loader_key="train",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
loader_key="train",
epoch=1,

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

epoch=1 default in profiler init

profiler_kwargs=dict(
activities=[
torch.profiler.ProfilerActivity.CPU,
torch.profiler.ProfilerActivity.CUDA,
],
on_trace_ready=torch.profiler.tensorboard_trace_handler(
os.path.join(self._logdir, "tb_profile")
),
with_stack=True,
with_flops=True,
),
)

if self._logdir is not None and not is_callback_exists(ICheckpointCallback):
Expand Down