dmlc / dmlc/dgl

[RFC] Support load DGLGraph from S3 directly

Open
#3,911 4 comments 0 reactions 0 assignees View on GitHub
RFC
Dominant language
Python
Stars
14.3k
Forks
3.1k
PR merge metrics
No merged PRs in 30d

Description

## 🚀 Feature
AWS S3 is well-know object storage service. With the support of loading DGLGraph directly fromS3 we can save the time of copying data from S3 into local storage and load the graph from local storage. This is useful in lots of distributed training scenarios, e.g., AWS batch, Amazon SageMaker, etc.

## Pitch
We are going to:
* Add support of loading S3 data directly in _CAPI_LoadGraphFiles_V2 and _CAPI_LoadLabels_V2. This can be achieved by extending https://github.com/dmlc/dgl/blob/66182b28ad425da3f038e5df1a0d25834571ab5f/src/graph/serialize/heterograph_serialize.cc#L124-L125 to also support S3 SeekStream ([CURLReadStreamBase](https://github.com/dmlc/dmlc-core/blob/f00e3ec7abc9f293a1b7061157b0a4e22a735cf5/src/io/s3_filesys.cc#L422)
* Optimize the case, when there are many graphs stored in a DGLGraph file. As the seeking operation in S3 is costly, we need to avoid the for loop here: https://github.com/dmlc/dgl/blob/66182b28ad425da3f038e5df1a0d25834571ab5f/src/graph/serialize/heterograph_serialize.cc#L148-L153

## Additional context

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.