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

[Data][3/N] Enable optimizer: fix stats and RandomizeBlocks #35952

Merged
merged 9 commits into from
Jun 1, 2023

Conversation

raulchen
Copy link
Contributor

@raulchen raulchen commented May 31, 2023

Why are these changes needed?

This is the last PR for enabling optimizer by default. It contains the following changes:

  • Fix DatasetStats related issues, including:
    • Map op names not including function names.
    • Read op names not including data source names.
    • RandomizeBlocks's name.
    • generate_randomize_blocks_fn returning empty stats, making it being skipped in summary.
  • Dropping support for fusing 2 actor-based map ops.
    • In the old backend, we fuse 2 actors only if they are the same class and have the same constructor args. This is not useful in practice. Test changes about num_cpus are related to this.
  • Fix the issue that ReorderRandomizeBlocksRule will modify the operator's input_dependencies in place. This is a bug because the operator instance might be shared by multiple Datasets.

Related issue number

Closes #32596

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.
  • 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: Hao Chen <chenh1024@gmail.com>
@raulchen raulchen changed the title [Data][3/N] Enable optimizer: [Data][3/N] Enable optimizer: fix stats and RandomizeBlocks May 31, 2023
raulchen added 4 commits May 31, 2023 14:37
Signed-off-by: Hao Chen <chenh1024@gmail.com>
Signed-off-by: Hao Chen <chenh1024@gmail.com>
Signed-off-by: Hao Chen <chenh1024@gmail.com>
Signed-off-by: Hao Chen <chenh1024@gmail.com>
raulchen added 3 commits May 31, 2023 16:39
Signed-off-by: Hao Chen <chenh1024@gmail.com>
Signed-off-by: Hao Chen <chenh1024@gmail.com>
Signed-off-by: Hao Chen <chenh1024@gmail.com>
# callable object.
return fn.__class__.__name__
except AttributeError as e:
logging.error("Failed to get name of UDF %s: %s", fn, e)
Copy link
Contributor

Choose a reason for hiding this comment

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

@@ -374,7 +374,7 @@ def test_map_batches_basic(ray_start_regular_shared, tmp_path, restore_data_cont

def test_map_batches_extra_args(shutdown_only, tmp_path):
ray.shutdown()
ray.init(num_cpus=2)
ray.init(num_cpus=3)
Copy link
Contributor

Choose a reason for hiding this comment

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

is this needed as a result of code changes in this PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is because we are no longer fusing actors.

Signed-off-by: Hao Chen <chenh1024@gmail.com>
@raulchen raulchen merged commit 609b8e6 into ray-project:master Jun 1, 2023
@raulchen raulchen deleted the enable-optimizer-3 branch June 1, 2023 04:37
scv119 pushed a commit to scv119/ray that referenced this pull request Jun 16, 2023
…ect#35952)

## Why are these changes needed?

This is the last PR for enabling optimizer by default. It contains the following changes:
- Fix DatasetStats related issues, including:
  - Map op names not including function names.
  - Read op names not including data source names.
  - RandomizeBlocks's name.
  - `generate_randomize_blocks_fn` returning empty stats, making it being skipped in summary.
- Dropping support for fusing 2 actor-based map ops. 
  - In the old backend, we fuse 2 actors only if they are the same class and have the same constructor args. This is not useful in practice. Test changes about `num_cpus` are related to this.
- Fix the issue that  `ReorderRandomizeBlocksRule`  will modify the operator's input_dependencies in place. This is a bug because the operator instance might be shared by multiple Datasets.

## Related issue number

Closes ray-project#32596
arvind-chandra pushed a commit to lmco/ray that referenced this pull request Aug 31, 2023
…ect#35952)

## Why are these changes needed?

This is the last PR for enabling optimizer by default. It contains the following changes:
- Fix DatasetStats related issues, including:
  - Map op names not including function names.
  - Read op names not including data source names.
  - RandomizeBlocks's name.
  - `generate_randomize_blocks_fn` returning empty stats, making it being skipped in summary.
- Dropping support for fusing 2 actor-based map ops.
  - In the old backend, we fuse 2 actors only if they are the same class and have the same constructor args. This is not useful in practice. Test changes about `num_cpus` are related to this.
- Fix the issue that  `ReorderRandomizeBlocksRule`  will modify the operator's input_dependencies in place. This is a bug because the operator instance might be shared by multiple Datasets.

## Related issue number

Closes ray-project#32596

Signed-off-by: e428265 <arvind.chandramouli@lmco.com>
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.

[Datasets] Enabling execution optimizer after passing all CI and nightly tests
3 participants