Giter VIP home page Giter VIP logo

autoshard's Issues

runtime error

I fixed the gym error. However, another error occurs.

[ERROR:640844 training:471 2022-10-12 11:16:25,954] Exception in worker process 0
Traceback (most recent call last):
  File "/home/lcfjr/codes/autoshard/autoshard/training.py", line 437, in act
    env_output = env.step(agent_output["action"])
  File "/home/lcfjr/codes/autoshard/autoshard/utils.py", line 72, in step
    frame, reward, done, info = self.gym_env.step(action.item())
  File "/home/lcfjr/codes/autoshard/autoshard/bench.py", line 310, in step
    reward = self._get_reward()
  File "/home/lcfjr/codes/autoshard/autoshard/bench.py", line 438, in _get_reward
    latencies = self._get_cost(self.plan, predictor=False)
  File "/home/lcfjr/codes/autoshard/autoshard/bench.py", line 323, in _get_cost
    costs = [self._envs[self.env_id].single_step([self.table_indices[self.env_id][i] for i in indices]) for j, indices in enumerate(indices_batch) if j in non_empty]
  File "/home/lcfjr/codes/autoshard/autoshard/bench.py", line 323, in <listcomp>
    costs = [self._envs[self.env_id].single_step([self.table_indices[self.env_id][i] for i in indices]) for j, indices in enumerate(indices_batch) if j in non_empty]
  File "/home/lcfjr/codes/autoshard/autoshard/bench.py", line 136, in single_step
    op = split_table_batched_embeddings_ops.SplitTableBatchedEmbeddingBagsCodegen(
  File "/home/lcfjr/.local/lib/python3.8/site-packages/fbgemm_gpu/split_table_batched_embeddings_ops.py", line 232, in __init__
    self.dummy_tensor: Tensor = torch.zeros(0, device=device)
  File "/home/lcfjr/miniconda3/envs/dev/lib/python3.8/site-packages/torch/cuda/__init__.py", line 207, in _lazy_init
    raise RuntimeError(
RuntimeError: Cannot re-initialize CUDA in forked subprocess. To use CUDA with multiprocessing, you must use the 'spawn' start method
```

'GymWrapper' object has no attribute 'seed'

I run python3 run_autoshard.py, however, encounter the following error.

File "/home/lcfjr/miniconda3/envs/dev/lib/python3.8/multiprocessing/process.py", line 315, in _bootstrap
self.run()
File "/home/lcfjr/miniconda3/envs/dev/lib/python3.8/multiprocessing/process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "/home/lcfjr/codes/autoshard/autoshard/training.py", line 474, in act
raise e
File "/home/lcfjr/codes/autoshard/autoshard/training.py", line 403, in act
gym_env.seed(seed)
AttributeError: 'GymWrapper' object has no attribute 'seed

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.