meta-pytorch / meta-pytorch/data

Broken tests for pickling circular reference DataPipe with dill

Open
#566 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1.3k
Forks
179
Avg merge
6d 1h
Merged PRs (30d)
2

Description

🐛 Describe the bug

During the work to fixing the problem with unhashable DataPipe in https://github.com/pytorch/pytorch/pull/80509, I find this test is broken:
https://github.com/pytorch/pytorch/blob/e266bea79395399d60bd3c684545f69ae6900236/test/test_datapipe.py#L2307-L2349

The failure is: TypeError: cannot pickle 'PyCapsule' object

I tried to remove all the DataPipe reference from the CustomDataPipe and LambdaIterDataPipe, the Error still persisted. I am not sure what would be the root cause.

I will disable the test in my PR but we need to investigate the culprit.

Versions

master branch on PT

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the circular-reference DataPipe test in test/test_datapipe.py around lines 2307-2349 and reproduce its dill failure, TypeError: cannot pickle 'PyCapsule' object. Trace the objects involved in the test and determine the source of the unpicklable PyCapsule. Done means the culprit is documented and the test passes without simply disabling it.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.