Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FileExistsError on launch #30

Open
gulzainali98 opened this issue Sep 19, 2022 · 0 comments
Open

FileExistsError on launch #30

gulzainali98 opened this issue Sep 19, 2022 · 0 comments

Comments

@gulzainali98
Copy link

gulzainali98 commented Sep 19, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant