Skip to content

Commit

Permalink
Added code for Rectifying (TypeError: unhashable type: 'slice') when …
Browse files Browse the repository at this point in the history
…copying file (dmlc#3049)

Co-authored-by: Ankit Garg <[email protected]>
Co-authored-by: Da Zheng <[email protected]>
  • Loading branch information
3 people authored Jul 2, 2021
1 parent 4e74dc8 commit 35ffceb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tools/copy_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ def main():
graph_name = part_metadata['graph_name']
node_map = part_metadata['node_map']
edge_map = part_metadata['edge_map']
if not isinstance(node_map, list):
if not isinstance(node_map, dict):
assert node_map[-4:] == '.npy', 'node map should be stored in a NumPy array.'
tmp_part_metadata['node_map'] = '{}/{}/node_map.npy'.format(args.workspace,
args.rel_data_path)
if not isinstance(edge_map, list):
if not isinstance(edge_map, dict):
assert edge_map[-4:] == '.npy', 'edge map should be stored in a NumPy array.'
tmp_part_metadata['edge_map'] = '{}/{}/edge_map.npy'.format(args.workspace,
args.rel_data_path)
Expand All @@ -80,9 +80,9 @@ def main():
copy_file(tmp_part_config, ip, '{}/{}'.format(args.workspace, args.rel_data_path))
node_map = part_metadata['node_map']
edge_map = part_metadata['edge_map']
if not isinstance(node_map, list):
if not isinstance(node_map, dict):
copy_file(node_map, ip, tmp_part_metadata['node_map'])
if not isinstance(edge_map, list):
if not isinstance(edge_map, dict):
copy_file(edge_map, ip, tmp_part_metadata['edge_map'])
remote_path = '{}/{}/part{}'.format(args.workspace, args.rel_data_path, part_id)
exec_cmd(ip, 'mkdir -p {}'.format(remote_path))
Expand Down

0 comments on commit 35ffceb

Please sign in to comment.