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

[GraphBolt] Fixing two issues in GraphBolt tests. #7059

Merged
merged 6 commits into from
Feb 4, 2024

Conversation

drivanov
Copy link
Contributor

@drivanov drivanov commented Feb 1, 2024

Description

The first issue we fixed here is the following warning appearing in test_basic_feature_store.py::test_basic_feature_store_errors

tests/python/pytorch/graphbolt/impl/test_basic_feature_store.py::test_basic_feature_store_errors
  /usr/local/lib/python3.10/dist-packages/_pytest/unraisableexception.py:78: PytestUnraisableExceptionWarning: Exception ignored in: <function TorchBasedFeature.__del__ at 0x7f282dcad6c0>
 
  Traceback (most recent call last):
    File "/usr/local/lib/python3.10/dist-packages/dgl/graphbolt/impl/torch_based_feature_store.py", line 93, in __del__
      for tensor in self._is_inplace_pinned:
  AttributeError: 'TorchBasedFeature' object has no attribute '_is_inplace_pinned'
 
    warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))

The second issue is a bug that occurs in the test_ondisk_dataset.py::test_OnDiskDataset_heterogeneous test, causing the following warning:

tests/python/pytorch/graphbolt/impl/test_ondisk_dataset.py::test_OnDiskDataset_heterogeneous[csv-True]
tests/python/pytorch/graphbolt/impl/test_ondisk_dataset.py::test_OnDiskDataset_heterogeneous[csv-False]
tests/python/pytorch/graphbolt/impl/test_ondisk_dataset.py::test_OnDiskDataset_heterogeneous[numpy-True]
tests/python/pytorch/graphbolt/impl/test_ondisk_dataset.py::test_OnDiskDataset_heterogeneous[numpy-False]
  /opt/dgl/dgl-source/tests/python/pytorch/graphbolt/gb_test_utils.py:272: UserWarning: you are shuffling a 'Tensor' object which is not a subclass of 'Sequence'; `shuffle` is not guaranteed to behave correctly. E.g., non-numpy array/tensor objects with view semantics may contain duplicates after shuffling.
    np.random.shuffle(user_ids)

In the debugger, I see incorrect shuffle results for user_ids which has no duplicates before shuffling:

(Pdb) user_ids
tensor([  0,   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13,
         14,  15,  16,  17,  18,  19,  20,  21,  22,  23,  24,  25,  26,  27,
         28,  29,  30,  31,  32,  33,  34,  35,  36,  37,  38,  39,  40,  41,
         42,  43,  44,  45,  46,  47,  48,  49,  50,  51,  52,  53,  54,  55,
         56,  57,  58,  59,  60,  61,  62,  63,  64,  65,  66,  67,  68,  69,

After shuffling there are a lot of them:

(Pdb) user_ids
tensor([  0,   1,   1,   3,   0,   2,   1,   3,   8,   5,   4,   9,  10,   1,
          9,   4,   6,   8,   9,   3,   4,  13,  14,   5,   8,   6,  16,  21,
         13,  19,  15,   3,  20,  17,  13,  10,   5,   7,  12,  25,   0,  18,
         39,  28,  12,  26,  43,   0,  38,  19,  31,  50,  38,  40,  16,   1,
         48,  40,  36,  57,  19,   2,  43,   5,  35,  28,  51,   2,  66,  37,
         31,  21,  65,  27,  68,  25,  25,  44,  32,  26,  30,  13,  20,   6,

Checklist

Please feel free to remove inapplicable items for your PR.

  • The PR title starts with [$CATEGORY] (such as [NN], [Model], [Doc], [Feature]])
  • I've leverage the tools to beautify the python and c++ code.
  • The PR is complete and small, read the Google eng practice (CL equals to PR) to understand more about small PR. In DGL, we consider PRs with less than 200 lines of core code change are small (example, test and documentation could be exempted).
  • To the best of my knowledge, examples are either not affected by this change, or have been fixed to be compatible with this change

Changes

@dgl-bot
Copy link
Collaborator

dgl-bot commented Feb 1, 2024

Not authorized to trigger CI. Please ask core developer to help trigger via issuing comment:

  • @dgl-bot

@dgl-bot
Copy link
Collaborator

dgl-bot commented Feb 1, 2024

Commit ID: a57e89fb992a5448290295afd0a98549cc2a8b22

Build ID: 1

Status: ❌ CI test failed in Stage [Authentication].

Report path: link

Full logs path: link

@mfbalin
Copy link
Collaborator

mfbalin commented Feb 1, 2024

One of the warnings was fixed in #7044. If you merge into the latest master, I believe it should go away.

@dgl-bot
Copy link
Collaborator

dgl-bot commented Feb 1, 2024

Not authorized to trigger CI. Please ask core developer to help trigger via issuing comment:

  • @dgl-bot

@dgl-bot
Copy link
Collaborator

dgl-bot commented Feb 1, 2024

Commit ID: ea19945e0d74c999fe477f5cfb0c1c83c7073a59

Build ID: 2

Status: ❌ CI test failed in Stage [Authentication].

Report path: link

Full logs path: link

@dgl-bot
Copy link
Collaborator

dgl-bot commented Feb 1, 2024

Not authorized to trigger CI. Please ask core developer to help trigger via issuing comment:

  • @dgl-bot

@dgl-bot
Copy link
Collaborator

dgl-bot commented Feb 1, 2024

Commit ID: ad71144

Build ID: 3

Status: ❌ CI test failed in Stage [Authentication].

Report path: link

Full logs path: link

@dgl-bot
Copy link
Collaborator

dgl-bot commented Feb 2, 2024

Not authorized to trigger CI. Please ask core developer to help trigger via issuing comment:

  • @dgl-bot

@Rhett-Ying
Copy link
Collaborator

@dgl-bot

@dgl-bot
Copy link
Collaborator

dgl-bot commented Feb 2, 2024

Commit ID: 6b99892

Build ID: 4

Status: ❌ CI test failed in Stage [Authentication].

Report path: link

Full logs path: link

Copy link
Collaborator

@Rhett-Ying Rhett-Ying left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please verify if is_inplace_pinned and revert the change here. others look good to me. please ping me once addressed the comments.

@dgl-bot
Copy link
Collaborator

dgl-bot commented Feb 2, 2024

Commit ID: 6b99892

Build ID: 5

Status: ✅ CI test succeeded.

Report path: link

Full logs path: link

@dgl-bot
Copy link
Collaborator

dgl-bot commented Feb 2, 2024

Not authorized to trigger CI. Please ask core developer to help trigger via issuing comment:

  • @dgl-bot

@dgl-bot
Copy link
Collaborator

dgl-bot commented Feb 2, 2024

Commit ID: f376701

Build ID: 6

Status: ❌ CI test failed in Stage [Authentication].

Report path: link

Full logs path: link

@drivanov
Copy link
Contributor Author

drivanov commented Feb 2, 2024

please verify if is_inplace_pinned and revert the change here. others look good to me. please ping me once addressed the comments.

@Rhett-Ying : just checked out fix#7044 for is_inplace_pinned and reverted my change for this issue.

@Rhett-Ying
Copy link
Collaborator

@dgl-bot

@dgl-bot
Copy link
Collaborator

dgl-bot commented Feb 4, 2024

Commit ID: b74025b4a3430d803578252c78a27ae9d5904e2a

Build ID: 7

Status: ✅ CI test succeeded.

Report path: link

Full logs path: link

@Rhett-Ying Rhett-Ying merged commit 95142b8 into dmlc:master Feb 4, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants