google-deepmind / google-deepmind/xmanager
FileExistsError on launch
- Dominant language
- Python
- Stars
- 921
- Forks
- 69
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 1
Description
I am trying to run the xmanager with following script.
```
from __future__ import annotations
from xmanager import xm
import os
from xmanager import xm_local
def main(_):
with xm_local.create_experiment(experiment_title='cifar102') as experiment:
# path = os.path.join(os.path.dirname(__file__), "learned_optimization")
path = os.path.join(os.path.dirname(__file__), "./")
spec = xm.PythonContainer(
path=path,
entrypoint=xm.CommandList(['main.py']),
)
[executable] = experiment.package([
xm.Packageable(
# What we are going to run.
executable_spec=spec,
# Where we are going to run it.
executor_spec=xm_local.Vertex.Spec(),
)
])
#
experiment.add(xm.Job(
executable=executable,
executor=xm_local.Vertex(xm.JobRequirements(a100=1)),
# Time to pass the batch size as a command-line argument!
# args={'batch_size': 16},
args={'--cfg': "configs/run_cub.yaml"},
# We can also pass environment variables.
env_vars={'HEAPPROFILE': '/tmp/a_out.hprof'},
))
if __name__ == '__main__':
app.run(main)
```
I get following fileexists error which did not occur when i first ran the code. I am not sure how to solve this issue.
Error:
`File "/home/gulzain/gen_39/lib/python3.9/site-packages/xmanager/xm_local/packaging/cloud.py", line 133, in _package_python_container
image = build_image.build(
File "/home/gulzain/gen_39/lib/python3.9/site-packages/xmanager/cloud/build_image.py", line 119, in build docker_lib.prepare_directory(staging, python_path, dirname, entrypoint,
File "/home/gulzain/gen_39/lib/python3.9/site-packages/xmanager/cloud/docker_lib.py", line 56, in prepare_directory shutil.copytree(source_directory,
File "/usr/lib/python3.9/shutil.py", line 568, in copytree
return _copytree(entries=entries, src=src, dst=dst, symlinks=symlinks,
File "/usr/lib/python3.9/shutil.py", line 467, in _copytree
os.makedirs(dst, exist_ok=dirs_exist_ok)
File "/usr/lib/python3.9/os.py", line 225, in makedirs
mkdir(name, mode)
FileExistsError: [Errno 17] File exists: '/tmp/tmpm5m_0mb_/'`
I have python3.9 and latest pip version of xmanager.
Contributor guide
Assessment
This issue has not been assessed yet.