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
fdc69f9d
"docs/git@developer.sourcefind.cn:renzhc/diffusers_dcu.git" did not exist on "798591346d7256c509c589ffcdc3488c8f2d2e07"
Unverified
Commit
fdc69f9d
authored
Aug 21, 2023
by
Leymore
Committed by
GitHub
Aug 21, 2023
Browse files
[Fix] local runner debug (#238)
parent
8d368d1c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
opencompass/runners/local.py
opencompass/runners/local.py
+12
-1
No files found.
opencompass/runners/local.py
View file @
fdc69f9d
...
@@ -59,7 +59,18 @@ class LocalRunner(BaseRunner):
...
@@ -59,7 +59,18 @@ class LocalRunner(BaseRunner):
for
task
in
tasks
:
for
task
in
tasks
:
task
=
TASKS
.
build
(
dict
(
type
=
self
.
task_cfg
.
type
,
cfg
=
task
))
task
=
TASKS
.
build
(
dict
(
type
=
self
.
task_cfg
.
type
,
cfg
=
task
))
task_name
=
task
.
name
task_name
=
task
.
name
task
.
run
()
# get cmd
mmengine
.
mkdir_or_exist
(
'tmp/'
)
param_file
=
f
'tmp/
{
os
.
getpid
()
}
_params.py'
task
.
cfg
.
dump
(
param_file
)
cmd
=
task
.
get_command
(
cfg_path
=
param_file
,
template
=
'{task_cmd}'
)
# run in subprocess if starts with torchrun etc.
if
cmd
.
startswith
(
'python'
):
task
.
run
()
else
:
subprocess
.
run
(
cmd
,
shell
=
True
,
text
=
True
)
os
.
remove
(
param_file
)
status
.
append
((
task_name
,
0
))
status
.
append
((
task_name
,
0
))
else
:
else
:
import
torch
import
torch
...
...
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