ray-project / ray

Ray is a unified framework for scaling AI and Python applications. Ray consists of a core distributed runtime and a set of AI Libraries for accelerating ML workloads.
https://ray.io
Apache License 2.0
31.94k stars 5.44k forks source link

[Ray Debugger]: up arrow doesn't recall last command #42164

Open zcarrico-fn opened 6 months ago

zcarrico-fn commented 6 months ago

What happened + What you expected to happen

When using Ray's debugger, using the up arrow key in a pdb session does not recall the last command as it would in a normal pdb session. Pressing the up arrow results in ^[[A appearing. Example:

(Pdb) print("test")
test
(Pdb) ^[[A
*** SyntaxError: invalid syntax

Versions / Dependencies

Ray2.9.0 Python3.10 Debian GNU/Linux 11 (bullseye)

Reproduction script

save the below as tmp.py

import ray
@ray.remote
def f(x):
    breakpoint()
    return x
ray.get(f.remote(1))
  1. Execute python tmp.py.
  2. In a separate terminal enter the pdb session using ray debug.
  3. Type 0, then enter.
  4. Type print(x), enter
  5. Press the up arrow. It will show ^[[A rather than print(x)

Issue Severity

Low: It annoys or frustrates me.

scottsun94 commented 5 months ago

@rkooo567 not sure if you know this. Is this something easy to fix?

rkooo567 commented 4 months ago

Core team doesn't maintain this feature now. @brycehuang30 do you happen to know?