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

feat: make ray optional #878

Merged
merged 36 commits into from
Jun 23, 2023
Merged

feat: make ray optional #878

merged 36 commits into from
Jun 23, 2023

Conversation

jarulraj
Copy link
Member

👋 Thanks for submitting a Pull Request to EvaDB!

🙌 We want to make contributing to EvaDB as easy and transparent as possible. Here are a few tips to get you started:

  • 🔍 Search existing EvaDB PRs to see if a similar PR already exists.
  • 🔗 Link this PR to a EvaDB issue to help us understand what bug fix or feature is being implemented.
  • 📈 Provide before and after profiling results to help us quantify the improvement your PR provides (if applicable).

👉 Please see our ✅ Contributing Guide for more details.

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@@ -65,6 +63,9 @@ def build_inner_executor(self, inner_executor):
self.inner_executor.children = [QueueReaderExecutor()]

def exec(self) -> Iterator[Batch]:
print("RAY")
Copy link
Member

Choose a reason for hiding this comment

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

Extra print

@@ -26,8 +22,10 @@ class StageCompleteSignal:
pass


@ray.remote(num_cpus=0)
def ray_wait_and_alert(tasks: List[ray.ObjectRef], queue: Queue):
def ray_wait_and_alert(tasks, queue):
Copy link
Member

Choose a reason for hiding this comment

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

Did you try running Ray enabled? I think this won't work if you remove the decorator.

Is this a good solution? https://stackoverflow.com/questions/16192448/conditional-definition-of-a-function-in-a-module

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, it worked fine even without the decorators.

Copy link
Member Author

Choose a reason for hiding this comment

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

https://docs.ray.io/en/latest/ray-core/api/doc/ray.remote.html

This seems like a simpler solution: f_with_2_gpus = f.options(num_gpus=2)

Copy link
Member

Choose a reason for hiding this comment

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

I think if we specify num_gpus on the Ray side, this (#817) issue may occur.

@@ -25,7 +25,7 @@ server:
socket_timeout: 60

experimental:
ray: True
ray: False
Copy link
Collaborator

Choose a reason for hiding this comment

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

We need to update the circle ci test setup, after making the default to be False. Currently we have all tests with ray enabled except COVERAGE. If we want to keep this test setup, we need to modify the circleci configuration accordingly.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, by default, let us disable it. For each python version, we could have build with ray disabled and ray enabled (ray installed and configuration variable set to True).

@@ -115,7 +116,8 @@ def __init__(self, config: ConfigurationManager):
LogicalVectorIndexScanToPhysical(),
]

ray_enabled = config.get_value("experimental", "ray")
# ray_enabled = config.get_value("experimental", "ray")
ray_enabled = is_ray_available()
Copy link
Collaborator

Choose a reason for hiding this comment

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

We can not turn off ray when ray is installed. Shall we do config.get_value("experimental", "ray") and is_ray_available() instead?

Copy link
Member Author

Choose a reason for hiding this comment

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

@gaurav274 We could probably re-enable this option. In addition to ray being installed, we can let user update this config variable to actually use ray. That will further reduce the likelihood of ray being accidentally used.

@gaurav274 gaurav274 merged commit 671894f into master Jun 23, 2023
@gaurav274 gaurav274 deleted the fix_notebooks2 branch June 23, 2023 01:28
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.

4 participants