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

Add "auto" dtype to RayLLMEngineArgs and some minor fixes #89

Merged
merged 4 commits into from
Feb 27, 2025

Conversation

SumanthRH
Copy link
Collaborator

@SumanthRH SumanthRH commented Feb 27, 2025

What does this PR do?

  • Adds auto dtype to RayLLMEngineArgs.
  • Fixes a multiprocessing error with TACO
  • Adds ray.shutdown for ray backend to not interfere with multiprocessing code in scoring stage.

x
Signed-off-by: SumanthRH <sumanthrh@anyscale.com>
x
Signed-off-by: SumanthRH <sumanthrh@anyscale.com>
x
Signed-off-by: SumanthRH <sumanthrh@anyscale.com>
x
Signed-off-by: SumanthRH <sumanthrh@anyscale.com>
Comment on lines -54 to -56
def _temp_run(problem, generation, debug, result):
try:
result.append(taco_run_test(problem, test=generation, debug=debug))
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixes a multiprocessing error with TACO:

Traceback (most recent call last):
  File "/Users/sumanthrh/.local/share/uv/python/cpython-3.10.15-macos-aarch64-none/lib/python3.10/concurrent/futures/process.py", line 246, in _process_worker
    r = call_item.fn(*call_item.args, **call_item.kwargs)
  File "/Users/sumanthrh/Documents/SkyThought/skythought/evals/tasks/taco/taco_handler.py", line 84, in update_results
    curr_res = self.check_correctness(problem, generation=last_code)
  File "/Users/sumanthrh/Documents/SkyThought/skythought/evals/tasks/taco/taco_handler.py", line 65, in check_correctness
    p.start()
  File "/Users/sumanthrh/.local/share/uv/python/cpython-3.10.15-macos-aarch64-none/lib/python3.10/multiprocessing/process.py", line 121, in start
    self._popen = self._Popen(self)
  File "/Users/sumanthrh/.local/share/uv/python/cpython-3.10.15-macos-aarch64-none/lib/python3.10/multiprocessing/context.py", line 224, in _Popen
    return _default_context.get_context().Process._Popen(process_obj)
  File "/Users/sumanthrh/.local/share/uv/python/cpython-3.10.15-macos-aarch64-none/lib/python3.10/multiprocessing/context.py", line 288, in _Popen
    return Popen(process_obj)
  File "/Users/sumanthrh/.local/share/uv/python/cpython-3.10.15-macos-aarch64-none/lib/python3.10/multiprocessing/popen_spawn_posix.py", line 32, in __init__
    super().__init__(process_obj)
  File "/Users/sumanthrh/.local/share/uv/python/cpython-3.10.15-macos-aarch64-none/lib/python3.10/multiprocessing/popen_fork.py", line 19, in __init__
    self._launch(process_obj)
  File "/Users/sumanthrh/.local/share/uv/python/cpython-3.10.15-macos-aarch64-none/lib/python3.10/multiprocessing/popen_spawn_posix.py", line 47, in _launch
    reduction.dump(process_obj, fp)
  File "/Users/sumanthrh/.local/share/uv/python/cpython-3.10.15-macos-aarch64-none/lib/python3.10/multiprocessing/reduction.py", line 60, in dump
    ForkingPickler(file, protocol).dump(obj)
AttributeError: Can't pickle local object 'TACOTaskHandler.check_correctness.<locals>._temp_run'

@SumanthRH SumanthRH changed the title Add "auto" dtype to RayLLMEngineArgs Add "auto" dtype to RayLLMEngineArgs and some minor fixes Feb 27, 2025
@SumanthRH SumanthRH merged commit 4bb8f3e into main Feb 27, 2025
2 checks passed
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.

2 participants