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
opencompass
Commits
c7ba1f70
"...composable_kernel.git" did not exist on "ec7c2e912e1c101ea8bad335f1f22670f448776c"
Unverified
Commit
c7ba1f70
authored
Jul 06, 2023
by
Tong Gao
Committed by
GitHub
Jul 06, 2023
Browse files
add comments (#13)
parent
cd1bec5f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
run.py
run.py
+10
-0
No files found.
run.py
View file @
c7ba1f70
...
@@ -179,6 +179,9 @@ def main():
...
@@ -179,6 +179,9 @@ def main():
LarkReporter
(
cfg
[
'lark_bot_url'
]).
post
(
content
)
LarkReporter
(
cfg
[
'lark_bot_url'
]).
post
(
content
)
if
args
.
mode
in
[
'all'
,
'infer'
]:
if
args
.
mode
in
[
'all'
,
'infer'
]:
# When user have specified --slurm or --dlc, or have not set
# "infer" in config, we will provide a default configuration
# for infer
if
(
args
.
dlc
or
args
.
slurm
)
and
cfg
.
get
(
'infer'
,
None
):
if
(
args
.
dlc
or
args
.
slurm
)
and
cfg
.
get
(
'infer'
,
None
):
logger
.
warning
(
'You have set "infer" in the config, but '
logger
.
warning
(
'You have set "infer" in the config, but '
'also specified --slurm or --dlc. '
'also specified --slurm or --dlc. '
...
@@ -193,6 +196,8 @@ def main():
...
@@ -193,6 +196,8 @@ def main():
tasks
=
partitioner
(
cfg
)
tasks
=
partitioner
(
cfg
)
# execute the infer subtasks
# execute the infer subtasks
exec_infer_runner
(
tasks
,
args
,
cfg
)
exec_infer_runner
(
tasks
,
args
,
cfg
)
# If they have specified "infer" in config and haven't used --slurm
# or --dlc, just follow the config
else
:
else
:
if
args
.
partition
is
not
None
:
if
args
.
partition
is
not
None
:
if
RUNNERS
.
get
(
cfg
.
infer
.
runner
.
type
)
==
SlurmRunner
:
if
RUNNERS
.
get
(
cfg
.
infer
.
runner
.
type
)
==
SlurmRunner
:
...
@@ -214,6 +219,9 @@ def main():
...
@@ -214,6 +219,9 @@ def main():
# evaluate
# evaluate
if
args
.
mode
in
[
'all'
,
'eval'
]:
if
args
.
mode
in
[
'all'
,
'eval'
]:
# When user have specified --slurm or --dlc, or have not set
# "eval" in config, we will provide a default configuration
# for eval
if
(
args
.
dlc
or
args
.
slurm
)
and
cfg
.
get
(
'eval'
,
None
):
if
(
args
.
dlc
or
args
.
slurm
)
and
cfg
.
get
(
'eval'
,
None
):
logger
.
warning
(
'You have set "eval" in the config, but '
logger
.
warning
(
'You have set "eval" in the config, but '
'also specified --slurm or --dlc. '
'also specified --slurm or --dlc. '
...
@@ -226,6 +234,8 @@ def main():
...
@@ -226,6 +234,8 @@ def main():
tasks
=
partitioner
(
cfg
)
tasks
=
partitioner
(
cfg
)
# execute the eval tasks
# execute the eval tasks
exec_eval_runner
(
tasks
,
args
,
cfg
)
exec_eval_runner
(
tasks
,
args
,
cfg
)
# If they have specified "eval" in config and haven't used --slurm
# or --dlc, just follow the config
else
:
else
:
if
args
.
partition
is
not
None
:
if
args
.
partition
is
not
None
:
if
RUNNERS
.
get
(
cfg
.
infer
.
runner
.
type
)
==
SlurmRunner
:
if
RUNNERS
.
get
(
cfg
.
infer
.
runner
.
type
)
==
SlurmRunner
:
...
...
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