Commit 0feca03
[Data] Elevate num_cpus/gpus and memory as top-level params in most APIs (ray-project#56419)
<!-- Thank you for your contribution! Please review
https://github.com/ray-project/ray/blob/master/CONTRIBUTING.rst before
opening a pull request. -->
<!-- Please add a reviewer to the assignee section when you create a PR.
If you don't have the access to it, we will shortly find a reviewer and
assign them to your PR. -->
## Why are these changes needed?
This PR:
- Add a util method `merge_resources_to_ray_remote_args` to add reaource
args : `num_cpus` `num_gpus` `memory` to `ray_remote_args` and a test
for it.
- Update `read_api.py` and `dataset.py` to elevate num_cpus/gpus and
memory as top-level params
<!-- Please give a short summary of the change and the problem this
solves. -->
## Related issue number
Closes ray-project#54708
<!-- For example: "Closes ray-project#1234" -->
## Checks
- [ ] I've signed off every commit(by using the -s flag, i.e., `git
commit -s`) in this PR.
- [ ] I've run `scripts/format.sh` to lint the changes in this PR.
- [ ] I've included any doc changes needed for
https://docs.ray.io/en/master/.
- [ ] I've added any new APIs to the API Reference. For example, if I
added a
method in Tune, I've added it in `doc/source/tune/api/` under the
corresponding `.rst` file.
- [x] I've made sure the tests are passing. Note that there might be a
few flaky tests, see the recent failures at https://flakey-tests.ray.io/
- Testing Strategy
- [ ] Unit tests
- [ ] Release tests
- [ ] This PR is not tested :(
---------
Signed-off-by: You-Cheng Lin (Owen) <mses010108@gmail.com>
Signed-off-by: Zhiqiang Ma <zhiqiang.ma@intel.com>1 parent bc03a93 commit 0feca03
File tree
5 files changed
+328
-22
lines changed- ci/lint
- python/ray/data
- _internal
- tests
5 files changed
+328
-22
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1369 | 1369 | | |
1370 | 1370 | | |
1371 | 1371 | | |
1372 | | - | |
1373 | | - | |
1374 | 1372 | | |
1375 | 1373 | | |
1376 | 1374 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
1752 | 1753 | | |
1753 | 1754 | | |
1754 | 1755 | | |
| 1756 | + | |
| 1757 | + | |
| 1758 | + | |
| 1759 | + | |
| 1760 | + | |
| 1761 | + | |
| 1762 | + | |
| 1763 | + | |
| 1764 | + | |
| 1765 | + | |
| 1766 | + | |
| 1767 | + | |
| 1768 | + | |
| 1769 | + | |
| 1770 | + | |
| 1771 | + | |
| 1772 | + | |
| 1773 | + | |
| 1774 | + | |
| 1775 | + | |
| 1776 | + | |
| 1777 | + | |
| 1778 | + | |
| 1779 | + | |
| 1780 | + | |
| 1781 | + | |
| 1782 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
| 98 | + | |
98 | 99 | | |
99 | 100 | | |
100 | 101 | | |
| |||
403 | 404 | | |
404 | 405 | | |
405 | 406 | | |
406 | | - | |
407 | | - | |
408 | | - | |
409 | | - | |
410 | | - | |
411 | | - | |
412 | | - | |
413 | | - | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
414 | 413 | | |
415 | 414 | | |
416 | 415 | | |
| |||
1365 | 1364 | | |
1366 | 1365 | | |
1367 | 1366 | | |
1368 | | - | |
1369 | | - | |
1370 | | - | |
1371 | | - | |
1372 | | - | |
1373 | | - | |
1374 | | - | |
1375 | | - | |
| 1367 | + | |
| 1368 | + | |
| 1369 | + | |
| 1370 | + | |
| 1371 | + | |
| 1372 | + | |
1376 | 1373 | | |
1377 | 1374 | | |
1378 | 1375 | | |
| |||
1400 | 1397 | | |
1401 | 1398 | | |
1402 | 1399 | | |
| 1400 | + | |
| 1401 | + | |
| 1402 | + | |
1403 | 1403 | | |
1404 | 1404 | | |
1405 | 1405 | | |
| |||
1441 | 1441 | | |
1442 | 1442 | | |
1443 | 1443 | | |
| 1444 | + | |
| 1445 | + | |
| 1446 | + | |
| 1447 | + | |
| 1448 | + | |
1444 | 1449 | | |
1445 | 1450 | | |
1446 | 1451 | | |
| |||
1515 | 1520 | | |
1516 | 1521 | | |
1517 | 1522 | | |
| 1523 | + | |
| 1524 | + | |
| 1525 | + | |
| 1526 | + | |
| 1527 | + | |
| 1528 | + | |
1518 | 1529 | | |
1519 | 1530 | | |
1520 | 1531 | | |
| |||
0 commit comments