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

[examples] Add IterationStrategies to MultiDataLoader/Module #94

Closed
wants to merge 10 commits into from

Conversation

IvanKobzarev
Copy link
Contributor

@IvanKobzarev IvanKobzarev commented Jun 15, 2022

Stack from ghstack (oldest at bottom):

Introducing common.data.IterationStrategy interface and its implementations for 'constant', 'round_robin', 'random', 'size_proportional' and 'ratios'

For ratios we can specify probabilities per each datamodule, for that we need to keep name <-> dataloader => Changing specification of loaders not as a list but by dictionary.

Using OrderedDict to keep the insertion order for the round_robin iteration strategy. (Since python 3.7 default dictionaries are insertion ordered)

Testing:
Intruducing tests
test/common/data/test_multidata.py
test/common/data/test_iteration_strategies.py

cd examples
python -m unittest test/common/data/*.py

Differential Revision: D37188386

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jun 15, 2022
IvanKobzarev added a commit that referenced this pull request Jun 15, 2022
ghstack-source-id: 4986d3c7f4e2b9ed4a1f0ed3c127e93531515111
Pull Request resolved: #94
IvanKobzarev added a commit that referenced this pull request Jun 15, 2022
ghstack-source-id: 4986d3c7f4e2b9ed4a1f0ed3c127e93531515111
Pull Request resolved: #94
@codecov-commenter
Copy link

codecov-commenter commented Jun 15, 2022

Codecov Report

❗ No coverage uploaded for pull request base (gh/ivankobzarev/6/base@a6cc812). Click here to learn what that means.
The diff coverage is n/a.

@@                    Coverage Diff                    @@
##             gh/ivankobzarev/6/base      #94   +/-   ##
=========================================================
  Coverage                          ?   92.97%           
=========================================================
  Files                             ?       47           
  Lines                             ?     2805           
  Branches                          ?        0           
=========================================================
  Hits                              ?     2608           
  Misses                            ?      197           
  Partials                          ?        0           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a6cc812...32eb587. Read the comment docs.

IvanKobzarev added a commit that referenced this pull request Jun 15, 2022
ghstack-source-id: 081b11e84bfa90725a0686fab58feb8d7da1d87f
Pull Request resolved: #94
@IvanKobzarev IvanKobzarev requested a review from ankitade June 15, 2022 21:23
@IvanKobzarev
Copy link
Contributor Author

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


Introducing `common.data.IterationStrategy` interface and its implementations for 'constant', 'round_robin', 'random', 'size_proportional' and 'ratios'

For ratios we can specify probabilities per each datamodule, for that we need to keep name <-> dataloader => Changing specification of loaders not as a list but by dictionary.

Using OrderedDict to keep the insertion order for the round_robin iteration strategy. (Since python 3.7 default dictionaries are insertion ordered)




Testing:
Intruducing tests
test/common/data/test_multidata.py
test/common/data/test_iteration_strategies.py

```
cd examples
python -m unittest test/common/data/*.py
```

Differential Revision: [D37188386](https://our.internmc.facebook.com/intern/diff/D37188386)

[ghstack-poisoned]
IvanKobzarev added a commit that referenced this pull request Jun 16, 2022
ghstack-source-id: b20fe653e45ec5b65edb685220c4831051199d2e
Pull Request resolved: #94
@IvanKobzarev
Copy link
Contributor Author

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

@IvanKobzarev IvanKobzarev requested a review from ebsmothers June 16, 2022 23:16

Introducing `common.data.IterationStrategy` interface and its implementations for 'constant', 'round_robin', 'random', 'size_proportional' and 'ratios'

For ratios we can specify probabilities per each datamodule, for that we need to keep name <-> dataloader => Changing specification of loaders not as a list but by dictionary.

Using OrderedDict to keep the insertion order for the round_robin iteration strategy. (Since python 3.7 default dictionaries are insertion ordered)




Testing:
Intruducing tests
test/common/data/test_multidata.py
test/common/data/test_iteration_strategies.py

```
cd examples
python -m unittest test/common/data/*.py
```

Differential Revision: [D37188386](https://our.internmc.facebook.com/intern/diff/D37188386)

[ghstack-poisoned]
IvanKobzarev added a commit that referenced this pull request Jun 16, 2022
ghstack-source-id: 845e5c829dd48ff6cf7b833a99e4354eb9fe6fa1
Pull Request resolved: #94
@IvanKobzarev
Copy link
Contributor Author

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


Introducing `common.data.IterationStrategy` interface and its implementations for 'constant', 'round_robin', 'random', 'size_proportional' and 'ratios'

For ratios we can specify probabilities per each datamodule, for that we need to keep name <-> dataloader => Changing specification of loaders not as a list but by dictionary.

Using OrderedDict to keep the insertion order for the round_robin iteration strategy. (Since python 3.7 default dictionaries are insertion ordered)




Testing:
Intruducing tests
test/common/data/test_multidata.py
test/common/data/test_iteration_strategies.py

```
cd examples
python -m unittest test/common/data/*.py
```

Differential Revision: [D37188386](https://our.internmc.facebook.com/intern/diff/D37188386)

[ghstack-poisoned]
IvanKobzarev added a commit that referenced this pull request Jun 17, 2022
ghstack-source-id: 8fae59f37ad38a9e6d96f28c3b2efa544cf750a0
Pull Request resolved: #94
@IvanKobzarev
Copy link
Contributor Author

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


Introducing `common.data.IterationStrategy` interface and its implementations for 'constant', 'round_robin', 'random', 'size_proportional' and 'ratios'

For ratios we can specify probabilities per each datamodule, for that we need to keep name <-> dataloader => Changing specification of loaders not as a list but by dictionary.

Using OrderedDict to keep the insertion order for the round_robin iteration strategy. (Since python 3.7 default dictionaries are insertion ordered)




Testing:
Intruducing tests
test/common/data/test_multidata.py
test/common/data/test_iteration_strategies.py

```
cd examples
python -m unittest test/common/data/*.py
```

Differential Revision: [D37188386](https://our.internmc.facebook.com/intern/diff/D37188386)

[ghstack-poisoned]
IvanKobzarev added a commit that referenced this pull request Jul 19, 2022
ghstack-source-id: 294c95e7a13214c4938ca0c8b05c3bbcbeeb411c
Pull Request resolved: #94
@IvanKobzarev
Copy link
Contributor Author

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


Introducing `common.data.IterationStrategy` interface and its implementations for 'constant', 'round_robin', 'random', 'size_proportional' and 'ratios'

For ratios we can specify probabilities per each datamodule, for that we need to keep name <-> dataloader => Changing specification of loaders not as a list but by dictionary.

Using OrderedDict to keep the insertion order for the round_robin iteration strategy. (Since python 3.7 default dictionaries are insertion ordered)




Testing:
Intruducing tests
test/common/data/test_multidata.py
test/common/data/test_iteration_strategies.py

```
cd examples
python -m unittest test/common/data/*.py
```

Differential Revision: [D37188386](https://our.internmc.facebook.com/intern/diff/D37188386)

[ghstack-poisoned]
IvanKobzarev added a commit that referenced this pull request Jul 19, 2022
ghstack-source-id: 49429ccd45c7e7a0ba12b8b04a029f2bc1481fcc
Pull Request resolved: #94

Introducing `common.data.IterationStrategy` interface and its implementations for 'constant', 'round_robin', 'random', 'size_proportional' and 'ratios'

For ratios we can specify probabilities per each datamodule, for that we need to keep name <-> dataloader => Changing specification of loaders not as a list but by dictionary.

Using OrderedDict to keep the insertion order for the round_robin iteration strategy. (Since python 3.7 default dictionaries are insertion ordered)




Testing:
Intruducing tests
test/common/data/test_multidata.py
test/common/data/test_iteration_strategies.py

```
cd examples
python -m unittest test/common/data/*.py
```

Differential Revision: [D37188386](https://our.internmc.facebook.com/intern/diff/D37188386)

[ghstack-poisoned]
IvanKobzarev added a commit that referenced this pull request Jul 19, 2022
ghstack-source-id: deb50818d1eaa28543c0f05ba4fffab68c28a6d9
Pull Request resolved: #94

Introducing `common.data.IterationStrategy` interface and its implementations for 'constant', 'round_robin', 'random', 'size_proportional' and 'ratios'

For ratios we can specify probabilities per each datamodule, for that we need to keep name <-> dataloader => Changing specification of loaders not as a list but by dictionary.

Using OrderedDict to keep the insertion order for the round_robin iteration strategy. (Since python 3.7 default dictionaries are insertion ordered)




Testing:
Intruducing tests
test/common/data/test_multidata.py
test/common/data/test_iteration_strategies.py

```
cd examples
python -m unittest test/common/data/*.py
```

Differential Revision: [D37188386](https://our.internmc.facebook.com/intern/diff/D37188386)

[ghstack-poisoned]
IvanKobzarev added a commit that referenced this pull request Jul 20, 2022
ghstack-source-id: ce664943fe80efe96cecb08634e45bccd9a0b0b0
Pull Request resolved: #94
@IvanKobzarev
Copy link
Contributor Author

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

@ankitade ankitade closed this Oct 11, 2022
@facebook-github-bot facebook-github-bot deleted the gh/ivankobzarev/6/head branch November 10, 2022 15:18
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants