Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the support of using WholeGraph distributed embedding to store/update sparse_emb #677

Merged
merged 35 commits into from
Feb 8, 2024

Conversation

chang-l
Copy link
Collaborator

@chang-l chang-l commented Dec 6, 2023

Update on 12/11/2023:

Most added code is covered by unit tests, except the sparse optimizer step function in graphstorm. To compensate it and gain more confident for the integrated feature, I also added an independent unit test test_wg_sparse_opt.py, which has no dependency on graphstorm, to show the integrated wholegraph sparse optimizer can generate close enough embs vs. torch sparse adam optimizer.

Current code should be compatible now, ie., all unit tests should pass (except the fails due to #685). This PR is ready for review.

Updated todos:

  • Test/debug for sparse_optimizer.step() to show the updates are consistent between WholeGraph vs. DistDGL vs. PyTorch
  • Need to validate/benchmark an end2end test with learnable embeddings using WholeGraph
  • Misc. questions/TODOs in the comments

Just like using WholeGraph distributed feature store for gathering, this PR tries to add the support of using WholeGraph to manage sparse_embs to unblock learnable embeddings with WholeGraph.

For now, it is still a draft PR. The working test only covers save/load sparse embeddings using WholeGraph.

Todos:

  • Test/debug for sparse_optimizer.step() to show the updates are consistent between WholeGraph vs. DistDGL vs. PyTorch
  • Still need to work on adding end2end test with learnable embeddings using WholeGraph (any missing pieces?)
  • Misc. questions/TODOs in the comments

@zheng-da @classicsong @isratnisa @nvcastet @TristonC

@chang-l chang-l marked this pull request as ready for review December 12, 2023 07:11
@classicsong classicsong added the ready able to trigger the CI label Dec 12, 2023
python/graphstorm/model/embed.py Outdated Show resolved Hide resolved
python/graphstorm/model/embed.py Show resolved Hide resolved
python/graphstorm/model/embed.py Outdated Show resolved Hide resolved
python/graphstorm/model/embed.py Outdated Show resolved Hide resolved
python/graphstorm/model/embed.py Outdated Show resolved Hide resolved
python/graphstorm/model/utils.py Outdated Show resolved Hide resolved
python/graphstorm/model/utils.py Outdated Show resolved Hide resolved
python/graphstorm/utils.py Outdated Show resolved Hide resolved
@chang-l
Copy link
Collaborator Author

chang-l commented Jan 13, 2024

@classicsong Here is an example of yaml file change, w.r.t this PR, to add wholegraph support for learnable embeddings: 44e4643

Note I only updated file gsgnn_lp.py for link pred tasks.

python/graphstorm/config/argument.py Outdated Show resolved Hide resolved
python/graphstorm/model/embed.py Outdated Show resolved Hide resolved
python/graphstorm/model/embed.py Outdated Show resolved Hide resolved
python/graphstorm/model/embed.py Outdated Show resolved Hide resolved
python/graphstorm/model/embed.py Outdated Show resolved Hide resolved
python/graphstorm/model/embed.py Outdated Show resolved Hide resolved
python/graphstorm/model/utils.py Show resolved Hide resolved
python/graphstorm/model/utils.py Show resolved Hide resolved
python/graphstorm/wholegraph/wholegraph.py Outdated Show resolved Hide resolved
python/graphstorm/wholegraph/wholegraph.py Outdated Show resolved Hide resolved
python/graphstorm/model/embed.py Outdated Show resolved Hide resolved
python/graphstorm/model/embed.py Outdated Show resolved Hide resolved
python/graphstorm/model/embed.py Show resolved Hide resolved
python/graphstorm/model/embed.py Show resolved Hide resolved
python/graphstorm/model/gnn.py Outdated Show resolved Hide resolved
python/graphstorm/wholegraph/wholegraph.py Outdated Show resolved Hide resolved
python/graphstorm/wholegraph/wholegraph.py Outdated Show resolved Hide resolved
python/graphstorm/wholegraph/wholegraph.py Outdated Show resolved Hide resolved
python/graphstorm/wholegraph/wholegraph.py Show resolved Hide resolved
python/graphstorm/model/utils.py Show resolved Hide resolved
python/graphstorm/model/embed.py Show resolved Hide resolved
python/graphstorm/wholegraph/wholegraph.py Show resolved Hide resolved
python/graphstorm/wholegraph/wholegraph.py Outdated Show resolved Hide resolved
tests/unit-tests/test_wg_sparse_opt.py Outdated Show resolved Hide resolved
@classicsong classicsong merged commit 5e05469 into awslabs:main Feb 8, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready able to trigger the CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants