daochenzha / autoshard Goto Github PK
View Code? Open in Web Editor NEW[KDD 2022] AutoShard: Automated Embedding Table Sharding for Recommender Systems
License: MIT License
[KDD 2022] AutoShard: Automated Embedding Table Sharding for Recommender Systems
License: MIT License
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
```
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.