Euler2.0 分布式训练问题
- Dominant language
- C++
- Stars
- 2.9k
- Forks
- 553
- PR merge metrics
- No merged PRs in 30d
Description
你好!
在跑分布式训练,参考了[Euler 2.0 在大规模图上的应用
](https://github.com/alibaba/euler/wiki/Euler-2.0-%E5%9C%A8%E5%A4%A7%E8%A7%84%E6%A8%A1%E5%9B%BE%E4%B8%8A%E7%9A%84%E5%BA%94%E7%94%A8) ,看到要把一个大的json数据分片成partition_num个json,分片的原则是边要和src 节点放在同一个json中,我没有找到这个分片的脚本,于是自己写了一个,分成多个json文件之后,需要转换成二进制文件,于是使用脚本
sh gen_partitioned_data.sh graph.json_0 index_meta output_dir s 0
sh gen_partitioned_data.sh graph.json_1 index_meta output_dir s 1
...
sh gen_partitioned_data.sh graph.json_(p-1) index_meta output_dir s (p-1)
设置了s=2在这个过程中发现会报错,查看原因出现在euler/euler/tools/json2partdat.py 的如下函数
self.nodes[edge_json['dst']].set_in_neighbor(
src_id,
edge_json['weight'],
edge_type,
self.gmeta.edge_type_count)
分析这个逻辑是设置self.nodes的这条边的dst的Node的邻居,然而self.nodes没有edge_json['dst']的Node,原因是我加载的这个grap.json_0 的文件只包含边和其src的节点,可能会出现其边的dst节点不在这个json_0文件中。
问题:
1. 我在怀疑是否我对分片的含义存在理解错误,我是否有必要编写一个脚本将大的json文件按照“边和src节点分在同一个json文件中”这个规定来分片呢?
2. 我看json2partdat.py 的代码逻辑好像就是分片的一个工作,但是输出的结果是.dat 文件,于是我困惑 shard_num 和 partition_num的含义。
3. 假设已经完成上述的分片工作,接下来要启动euler
>
euler.start(
directory='euler_graph_data_dir', # 图数据路径
shard_idx=k, # 当前启动的进程为k号shard
shard_num=N, # 一共有N个shard
zk_addr=zk_addr, # Zookeeper address, ip:port
zk_path=zk_path, # Zookeeper path
module=euler.Module.DEFAULT_MODULE)
while True:
我理解这里的shard_num 是和tf 的worker个数是一致的,euler的图引擎个数和tf worker个数一致,每个graph engine 加载一部分数据,我是否可以将分片好的数据存储在每个worker里而不是hdfs(目前只是想测试一下,数据使用的比较小),然后通过euler_graph_data_dir指定路径,另外 不是很明白zk_path的含义?
以上是我的问题,期待开发团队的回复
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the linked Euler 2.0 wiki page and run gen_partitioned_data.sh on the partitioned JSON files to reproduce the failure in euler/euler/tools/json2partdat.py. Trace how json2partdat.py uses shard_num and partition_num, then inspect the euler.start entry point for local data paths and zk_path. Done means the expected partitioning, shard layout, local-storage behavior, and Zookeeper path semantics are established.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, tensorflow
- Domain
- data-engineering, distributed-systems, machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100