Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
ICV-mmengine_basecode
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Florian Schiffel
ICV-mmengine_basecode
Commits
cfb884c1
Unverified
Commit
cfb884c1
authored
2 years ago
by
takuoko
Committed by
GitHub
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[Enhancement] update docstring of wandb define_metric (#509)
* wandb define_metric * fix docs * add wandb docs link
parent
ac5e79c6
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
mmengine/visualization/vis_backend.py
+14
-0
14 additions, 0 deletions
mmengine/visualization/vis_backend.py
with
14 additions
and
0 deletions
mmengine/visualization/vis_backend.py
+
14
−
0
View file @
cfb884c1
...
@@ -340,6 +340,15 @@ class WandbVisBackend(BaseVisBackend):
...
@@ -340,6 +340,15 @@ class WandbVisBackend(BaseVisBackend):
produced by the visualizer.
produced by the visualizer.
init_kwargs (dict, optional): wandb initialization
init_kwargs (dict, optional): wandb initialization
input parameters. Default to None.
input parameters. Default to None.
define_metric_cfg (dict, optional):
A dict of metrics and summary for wandb.define_metric.
The key is metric and the value is summary.
When ``define_metric_cfg={
'
coco/bbox_mAP
'
:
'
max
'
}``,
The maximum value of``coco/bbox_mAP`` is logged on wandb UI.
See
`wandb docs <https://docs.wandb.ai/ref/python/run#define_metric>`_
for details.
Default: None
commit: (bool, optional) Save the metrics dict to the wandb server
commit: (bool, optional) Save the metrics dict to the wandb server
and increment the step. If false `wandb.log` just
and increment the step. If false `wandb.log` just
updates the current metrics dict with the row argument
updates the current metrics dict with the row argument
...
@@ -350,9 +359,11 @@ class WandbVisBackend(BaseVisBackend):
...
@@ -350,9 +359,11 @@ class WandbVisBackend(BaseVisBackend):
def
__init__
(
self
,
def
__init__
(
self
,
save_dir
:
str
,
save_dir
:
str
,
init_kwargs
:
Optional
[
dict
]
=
None
,
init_kwargs
:
Optional
[
dict
]
=
None
,
define_metric_cfg
:
Optional
[
dict
]
=
None
,
commit
:
Optional
[
bool
]
=
True
):
commit
:
Optional
[
bool
]
=
True
):
super
().
__init__
(
save_dir
)
super
().
__init__
(
save_dir
)
self
.
_init_kwargs
=
init_kwargs
self
.
_init_kwargs
=
init_kwargs
self
.
_define_metric_cfg
=
define_metric_cfg
self
.
_commit
=
commit
self
.
_commit
=
commit
def
_init_env
(
self
):
def
_init_env
(
self
):
...
@@ -370,6 +381,9 @@ class WandbVisBackend(BaseVisBackend):
...
@@ -370,6 +381,9 @@ class WandbVisBackend(BaseVisBackend):
'
Please run
"
pip install wandb
"
to install wandb
'
)
'
Please run
"
pip install wandb
"
to install wandb
'
)
wandb
.
init
(
**
self
.
_init_kwargs
)
wandb
.
init
(
**
self
.
_init_kwargs
)
if
self
.
_define_metric_cfg
is
not
None
:
for
metric
,
summary
in
self
.
_define_metric_cfg
.
items
():
wandb
.
define_metric
(
metric
,
summary
=
summary
)
self
.
_wandb
=
wandb
self
.
_wandb
=
wandb
@property
# type: ignore
@property
# type: ignore
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment