Skip to content

Enable miniepoch for MultiProcessingReadingService#1147

Closed
ejguan wants to merge 1 commit intometa-pytorch:mainfrom
ejguan:export-D45289736
Closed

Enable miniepoch for MultiProcessingReadingService#1147
ejguan wants to merge 1 commit intometa-pytorch:mainfrom
ejguan:export-D45289736

Conversation

@ejguan
Copy link
Contributor

@ejguan ejguan commented May 2, 2023

Summary:
Add pause, resume, limit API to MultiProcessingReadingService to support miniepoch API.

  • Adding a function as the input to make sure it working with internal ReadingService to control miniepoch within the worker/dispatching process

All tests should be passing in test/dataloader2/test_mrps.py

Differential Revision: D45289736

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported labels May 2, 2023
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D45289736

@facebook-github-bot
Copy link
Contributor

@ejguan has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@ejguan ejguan requested a review from NivekT May 2, 2023 15:09
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D45289736

ejguan added a commit to ejguan/data that referenced this pull request May 2, 2023
Summary:
Add `pause`, `resume`, `limit` API to `MultiProcessingReadingService` to support miniepoch API.
- Adding a function as the input to make sure it working with internal ReadingService to control miniepoch within the worker/dispatching process

Pull Request resolved: meta-pytorch#1147

Differential Revision: D45289736

Pulled By: ejguan

fbshipit-source-id: 66a130e17eb32d5aa4a76c8c98f84ca0948a3043
@ejguan ejguan force-pushed the export-D45289736 branch 2 times, most recently from f191614 to 4b65c80 Compare May 2, 2023 15:24
@facebook-github-bot
Copy link
Contributor

@ejguan has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

ejguan added a commit to ejguan/data that referenced this pull request May 2, 2023
Summary:
Add `pause`, `resume`, `limit` API to `MultiProcessingReadingService` to support miniepoch API.
- Adding a function as the input to make sure it working with internal ReadingService to control miniepoch within the worker/dispatching process

All tests should be passing in `test/dataloader2/test_mrps.py`

Pull Request resolved: meta-pytorch#1147

Differential Revision: D45289736

Pulled By: ejguan

fbshipit-source-id: aaa6e5c93673bfce151f72bd1b00899cce423166
@ejguan ejguan force-pushed the export-D45289736 branch from 4b65c80 to 3dd4201 Compare May 2, 2023 15:49
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D45289736

Copy link
Contributor

@NivekT NivekT left a comment

Choose a reason for hiding this comment

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

With this PR, is pause/resume full functional with dispatching process? Or is something still missing?

@ejguan ejguan force-pushed the export-D45289736 branch from 3dd4201 to b958895 Compare May 3, 2023 16:24
@facebook-github-bot
Copy link
Contributor

@ejguan has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

Summary:
Add `pause`, `resume`, `limit` API to `MultiProcessingReadingService` to support miniepoch API.
- Adding a function as the input to make sure it working with internal ReadingService to control miniepoch within the worker/dispatching process

All tests should be passing in `test/dataloader2/test_mrps.py`

Pull Request resolved: meta-pytorch#1147

Reviewed By: NivekT

Differential Revision: D45289736

Pulled By: ejguan

fbshipit-source-id: d8444c310b697b6c8a5e2f8ad3304aabfce5ae34
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D45289736

@facebook-github-bot
Copy link
Contributor

@ejguan merged this pull request in 11bb5b8.

@facebook-github-bot
Copy link
Contributor

This pull request has been reverted by bda2c18.

ejguan added a commit to ejguan/data that referenced this pull request May 23, 2023
Summary:
A retry of meta-pytorch#1147
- Add pause, resume, limit API to MultiProcessingReadingService to support miniepoch API.
- When limit is requested, `IterQueueWrapper` will make sure only `limit` number of requests are sent to worker process and dispatching proccess.
- Consolidate a few API/messages
  - reset and reset_epoch is merged as a single message
  - Process reset function is shared for both worker process and dispatching process
- For pause/resume/limit/reset_epoch, add a counter to sync between loops to make sure the DataPipe graph is in-place modified once.
- Remove unused thread eventloop

Differential Revision: D45666912

fbshipit-source-id: 05743228c4102c76825030bcbf502a5154da6f52
ejguan added a commit to ejguan/data that referenced this pull request May 23, 2023
…pytorch#1170)

Summary:
Pull Request resolved: meta-pytorch#1170

A retry of meta-pytorch#1147
- Add pause, resume, limit API to MultiProcessingReadingService to support miniepoch API.
- When limit is requested, `IterQueueWrapper` will make sure only `limit` number of requests are sent to worker process and dispatching proccess.
- Consolidate a few API/messages
  - reset and reset_epoch is merged as a single message
  - Process reset function is shared for both worker process and dispatching process
- For pause/resume/limit/reset_epoch, add a counter to sync between loops to make sure the DataPipe graph is in-place modified once.
- Remove unused thread eventloop

Differential Revision: D45666912

fbshipit-source-id: 48176f10354494754f47a96a1ca166ed45e7e247
ejguan added a commit to ejguan/data that referenced this pull request May 23, 2023
…pytorch#1170)

Summary:
Pull Request resolved: meta-pytorch#1170

A retry of meta-pytorch#1147
- Add pause, resume, limit API to MultiProcessingReadingService to support miniepoch API.
- When limit is requested, `IterQueueWrapper` will make sure only `limit` number of requests are sent to worker process and dispatching proccess.
- Consolidate a few API/messages
  - reset and reset_epoch is merged as a single message
  - Process reset function is shared for both worker process and dispatching process
- For pause/resume/limit/reset_epoch, add a counter to sync between loops to make sure the DataPipe graph is in-place modified once.
- Remove unused thread eventloop

Differential Revision: D45666912

fbshipit-source-id: a2e064371a510463cc13253419aa7d95233bf41e
ejguan added a commit to ejguan/data that referenced this pull request May 23, 2023
Summary:
A retry of meta-pytorch#1147
- Add pause, resume, limit API to MultiProcessingReadingService to support miniepoch API.
- When limit is requested, `IterQueueWrapper` will make sure only `limit` number of requests are sent to worker process and dispatching proccess.
- Consolidate a few API/messages
  - reset and reset_epoch is merged as a single message
  - Process reset function is shared for both worker process and dispatching process
- For pause/resume/limit/reset_epoch, add a counter to sync between loops to make sure the DataPipe graph is in-place modified once.
- Remove unused thread eventloop

Pull Request resolved: meta-pytorch#1170

Differential Revision: D45666912

Pulled By: ejguan

fbshipit-source-id: 1e88dde3af0f406c062ca523e7b96a3c79a74b6d
ejguan added a commit to ejguan/data that referenced this pull request May 26, 2023
Summary:
A retry of meta-pytorch#1147
- Add pause, resume, limit API to MultiProcessingReadingService to support miniepoch API.
- When limit is requested, `IterQueueWrapper` will make sure only `limit` number of requests are sent to worker process and dispatching proccess.
- Consolidate a few API/messages
  - reset and reset_epoch is merged as a single message
  - Process reset function is shared for both worker process and dispatching process
- For pause/resume/limit/reset_epoch, add a counter to sync between loops to make sure the DataPipe graph is in-place modified once.
- Remove unused thread eventloop

Pull Request resolved: meta-pytorch#1170

Differential Revision: D45666912

Pulled By: ejguan

fbshipit-source-id: 1e88dde3af0f406c062ca523e7b96a3c79a74b6d
ejguan added a commit to ejguan/data that referenced this pull request May 26, 2023
Summary:
A retry of meta-pytorch#1147
- Add pause, resume, limit API to MultiProcessingReadingService to support miniepoch API.
- When limit is requested, `IterQueueWrapper` will make sure only `limit` number of requests are sent to worker process and dispatching proccess.
- Consolidate a few API/messages
  - reset and reset_epoch is merged as a single message
  - Process reset function is shared for both worker process and dispatching process
- For pause/resume/limit/reset_epoch, add a counter to sync between loops to make sure the DataPipe graph is in-place modified once.
- Remove unused thread eventloop

Pull Request resolved: meta-pytorch#1170

Differential Revision: D45666912

Pulled By: ejguan

fbshipit-source-id: ddff582f35a25528a2b8a1751ea0d0359f866ed0
ejguan added a commit to ejguan/data that referenced this pull request May 26, 2023
Summary:
A retry of meta-pytorch#1147
- Add pause, resume, limit API to MultiProcessingReadingService to support miniepoch API.
- When limit is requested, `IterQueueWrapper` will make sure only `limit` number of requests are sent to worker process and dispatching proccess.
- Consolidate a few API/messages
  - reset and reset_epoch is merged as a single message
  - Process reset function is shared for both worker process and dispatching process
- For pause/resume/limit/reset_epoch, add a counter to sync between loops to make sure the DataPipe graph is in-place modified once.
- Remove unused thread eventloop

Pull Request resolved: meta-pytorch#1170

Differential Revision: D45666912

Pulled By: ejguan

fbshipit-source-id: f533892a1ffcdc103988a724bea8ce20572465b6
ejguan added a commit to ejguan/data that referenced this pull request May 26, 2023
Summary:
A retry of meta-pytorch#1147
- Add pause, resume, limit API to MultiProcessingReadingService to support miniepoch API.
- When limit is requested, `IterQueueWrapper` will make sure only `limit` number of requests are sent to worker process and dispatching proccess.
- Consolidate a few API/messages
  - reset and reset_epoch is merged as a single message
  - Process reset function is shared for both worker process and dispatching process
- For pause/resume/limit/reset_epoch, add a counter to sync between loops to make sure the DataPipe graph is in-place modified once.
- Remove unused thread eventloop

Pull Request resolved: meta-pytorch#1170

Differential Revision: D45666912

Pulled By: ejguan

fbshipit-source-id: 40ec4eef0fdf1de05d3a545e08c11f155446ae2d
ejguan added a commit to ejguan/data that referenced this pull request May 26, 2023
Summary:
A retry of meta-pytorch#1147
- Add pause, resume, limit API to MultiProcessingReadingService to support miniepoch API.
- When limit is requested, `IterQueueWrapper` will make sure only `limit` number of requests are sent to worker process and dispatching proccess.
- Consolidate a few API/messages
  - reset and reset_epoch is merged as a single message
  - Process reset function is shared for both worker process and dispatching process
- For pause/resume/limit/reset_epoch, add a counter to sync between loops to make sure the DataPipe graph is in-place modified once.
- Remove unused thread eventloop

Pull Request resolved: meta-pytorch#1170

Differential Revision: D45666912

Pulled By: ejguan

fbshipit-source-id: ffafcbb0b78add9c863d2faaec7248332ef36f68
ejguan added a commit to ejguan/data that referenced this pull request May 26, 2023
Summary:
A retry of meta-pytorch#1147
- Add pause, resume, limit API to MultiProcessingReadingService to support miniepoch API.
- When limit is requested, `IterQueueWrapper` will make sure only `limit` number of requests are sent to worker process and dispatching proccess.
- Consolidate a few API/messages
  - reset and reset_epoch is merged as a single message
  - Process reset function is shared for both worker process and dispatching process
- For pause/resume/limit/reset_epoch, add a counter to sync between loops to make sure the DataPipe graph is in-place modified once.
- Remove unused thread eventloop

Pull Request resolved: meta-pytorch#1170

Differential Revision: D45666912

Pulled By: ejguan

fbshipit-source-id: 7f4d208e3ff0a6bea4688862f7b8d5456af8e7f6
facebook-github-bot pushed a commit that referenced this pull request May 26, 2023
Summary:
A retry of #1147
- Add pause, resume, limit API to MultiProcessingReadingService to support miniepoch API.
- When limit is requested, `IterQueueWrapper` will make sure only `limit` number of requests are sent to worker process and dispatching proccess.
- Consolidate a few API/messages
  - reset and reset_epoch is merged as a single message
  - Process reset function is shared for both worker process and dispatching process
- For pause/resume/limit/reset_epoch, add a counter to sync between loops to make sure the DataPipe graph is in-place modified once.
- Remove unused thread eventloop

Pull Request resolved: #1170

Reviewed By: NivekT

Differential Revision: D45666912

Pulled By: ejguan

fbshipit-source-id: a22f0c74c78423b1833d5b2cf8cbdab6b9eb9ea0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged Reverted

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants