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
ycai
simbricks
Commits
32441b27
"...composable_kernel.git" did not exist on "246723392ba7351dcc713bc472d585cb549dd6cb"
Commit
32441b27
authored
Jul 05, 2021
by
Antoine Kaufmann
Browse files
experiments: introduce mkdir and rmtree in executor
parent
0fe2c879
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
1 deletion
+15
-1
experiments/simbricks/exectools.py
experiments/simbricks/exectools.py
+15
-1
No files found.
experiments/simbricks/exectools.py
View file @
32441b27
...
@@ -23,6 +23,8 @@
...
@@ -23,6 +23,8 @@
import
asyncio
import
asyncio
import
shlex
import
shlex
import
os
import
os
import
pathlib
import
shutil
import
signal
import
signal
class
HostConfig
(
object
):
class
HostConfig
(
object
):
...
@@ -205,6 +207,12 @@ class Executor(object):
...
@@ -205,6 +207,12 @@ class Executor(object):
async
def
send_file
(
self
,
path
,
verbose
=
False
):
async
def
send_file
(
self
,
path
,
verbose
=
False
):
raise
NotImplementedError
(
"Please Implement this method"
)
raise
NotImplementedError
(
"Please Implement this method"
)
async
def
mkdir
(
self
,
path
,
verbose
=
False
):
raise
NotImplementedError
(
"Please Implement this method"
)
async
def
rmtree
(
self
,
path
,
verbose
=
False
):
raise
NotImplementedError
(
"Please Implement this method"
)
# runs the list of commands as strings sequentially
# runs the list of commands as strings sequentially
async
def
run_cmdlist
(
self
,
label
,
cmds
,
verbose
=
True
,
host
=
None
):
async
def
run_cmdlist
(
self
,
label
,
cmds
,
verbose
=
True
,
host
=
None
):
i
=
0
i
=
0
...
@@ -226,4 +234,10 @@ class LocalExecutor(Executor):
...
@@ -226,4 +234,10 @@ class LocalExecutor(Executor):
async
def
send_file
(
self
,
path
,
verbose
):
async
def
send_file
(
self
,
path
,
verbose
):
# locally we do not need to do anything
# locally we do not need to do anything
pass
pass
\ No newline at end of file
async
def
mkdir
(
self
,
path
,
verbose
=
False
):
pathlib
.
Path
(
path
).
mkdir
(
parents
=
True
,
exist_ok
=
True
)
async
def
rmtree
(
self
,
path
,
verbose
=
False
):
shutil
.
rmtree
(
path
,
ignore_errors
=
True
)
\ No newline at end of file
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