Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
Megatron-LM
Commits
e9b90500
"examples/pytorch/vscode:/vscode.git/clone" did not exist on "5b2d44faaaea47c76cdf5d721d1f69eb9c7f620a"
Commit
e9b90500
authored
Jan 29, 2021
by
mohammad
Browse files
added option to change tensorboard queue size
parent
0e5b64af
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
megatron/arguments.py
megatron/arguments.py
+4
-0
megatron/global_vars.py
megatron/global_vars.py
+2
-1
No files found.
megatron/arguments.py
View file @
e9b90500
...
@@ -285,6 +285,10 @@ def _add_logging_args(parser):
...
@@ -285,6 +285,10 @@ def _add_logging_args(parser):
help
=
'If set, calculate and log parameters norm.'
)
help
=
'If set, calculate and log parameters norm.'
)
group
.
add_argument
(
'--tensorboard-log-interval'
,
type
=
int
,
default
=
1
,
group
.
add_argument
(
'--tensorboard-log-interval'
,
type
=
int
,
default
=
1
,
help
=
'Report to tensorboard interval.'
)
help
=
'Report to tensorboard interval.'
)
group
.
add_argument
(
'--tensorboard-queue-size'
,
type
=
int
,
default
=
1000
,
help
=
'Size of the tensorboard queue for pending events '
'and summaries before one of the ‘add’ calls forces a '
'flush to disk.'
)
group
.
add_argument
(
'--log-timers-to-tensorboard'
,
action
=
'store_true'
,
group
.
add_argument
(
'--log-timers-to-tensorboard'
,
action
=
'store_true'
,
help
=
'If set, write timers to tensorboard.'
)
help
=
'If set, write timers to tensorboard.'
)
group
.
add_argument
(
'--log-batch-size-to-tensorboard'
,
action
=
'store_true'
,
group
.
add_argument
(
'--log-batch-size-to-tensorboard'
,
action
=
'store_true'
,
...
...
megatron/global_vars.py
View file @
e9b90500
...
@@ -137,7 +137,8 @@ def _set_tensorboard_writer(args):
...
@@ -137,7 +137,8 @@ def _set_tensorboard_writer(args):
from
torch.utils.tensorboard
import
SummaryWriter
from
torch.utils.tensorboard
import
SummaryWriter
print
(
'> setting tensorboard ...'
)
print
(
'> setting tensorboard ...'
)
_GLOBAL_TENSORBOARD_WRITER
=
SummaryWriter
(
_GLOBAL_TENSORBOARD_WRITER
=
SummaryWriter
(
log_dir
=
args
.
tensorboard_dir
)
log_dir
=
args
.
tensorboard_dir
,
max_queue
=
args
.
tensorboard_queue_size
)
except
ModuleNotFoundError
:
except
ModuleNotFoundError
:
print
(
'WARNING: TensorBoard writing requested but is not '
print
(
'WARNING: TensorBoard writing requested but is not '
'available (are you using PyTorch 1.1.0 or later?), '
'available (are you using PyTorch 1.1.0 or later?), '
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment