dmlc / dmlc/dgl

[GraphBolt] ItemSetDict should inherit from Dict/Mapping

Open
#6,785 0 comments 0 reactions 1 assignee Assigned to @Skeleton003 View on GitHub
Work Item
Dominant language
Python
Stars
14.3k
Forks
3.1k
PR merge metrics
No merged PRs in 30d

Description

## 🔨Work Item

**IMPORTANT:**
* This template is only for dev team to track project progress. For feature request or bug report, please use the corresponding issue templates.
* DO NOT create a new work item if the purpose is to fix an existing issue or feature request. We will directly use the issue in the project tracker.

Project tracker: https://github.com/orgs/dmlc/projects/2

## Description
For now, `ItemSetDict` is like a dictionary but not a real one as dict-like operations such as `pop()`, `keys()` are not supported. But these methods are very helpful for beginner to check what data are stored in `ItemSetDict`.
One solution is make `ItemSetDict` inherit from `Mapping` which offers dict-like methods in nature. And for the special case: iterating over data instead of keys in GraphBolt's DataLoader, we could just offer a dedicated **iterator** for it. Then `ItemSetDict` supports iterating over keys(which is like dict) and iterating over data(nodes/edges dimensions for `ItemSampler` in GraphBolt) simultaneously.

## Depending work items or issues

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.