You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
rynewang opened this issue
Mar 31, 2024
· 1 comment
· Fixed by #44381
Assignees
Labels
bugSomething that is supposed to be working; but isn'tcoreIssues that should be addressed in Ray CoreP1Issue that should be fixed within a few weeksstability
In actor.py, _ActorClassMetadata is a simple data class and is automatically pickled/unpickled. This means the field last_export_session_and_job is passed across workers. However it should not - the session index is a worker-local concept and does not mean anything when passed around.
This has a real issue because, it's used to determine if we need to upload actor class to GCS. If in a first session we upload it and thus setting session = 0; then in second session, we pass the Actor to a task (fresh worker, session = 0) and invoke the Actor, the worker thinks it's already uploaded and skip the upload, causing actor creation failure.
Versions / Dependencies
master
Reproduction script
importray@ray.remoteclassA:
def__init__(self):
print("A.__init__")
defhello(self):
print("A.hello")
ray.init()
# Here: A session = None, worker session = 0; uploaded.a=A.remote()
# Here: A session = 0ray.get(a.hello.remote())
ray.shutdown()
@ray.remotedeff():
# A is unpickled with session = 0 (should be = None)# Here: A session = 0, worker.session = 0, does not upload A.# actor creation failed.a=A.remote()
ray.get(a.hello.remote())
ray.get(f.remote())
Issue Severity
Medium: It is a significant difficulty but I can work around it.
The text was updated successfully, but these errors were encountered:
rynewang
added
bug
Something that is supposed to be working; but isn't
triage
Needs triage (eg: priority, bug/not-bug, and owning component)
P1
Issue that should be fixed within a few weeks
core
Issues that should be addressed in Ray Core
labels
Mar 31, 2024
Same things happen for Ray Tasks - class RemoteFunction is having a similar field _last_export_session_and_job and if we replicate the repro script for task, it hangs.
bugSomething that is supposed to be working; but isn'tcoreIssues that should be addressed in Ray CoreP1Issue that should be fixed within a few weeksstability
What happened + What you expected to happen
In
actor.py
,_ActorClassMetadata
is a simple data class and is automatically pickled/unpickled. This means the fieldlast_export_session_and_job
is passed across workers. However it should not - the session index is a worker-local concept and does not mean anything when passed around.This has a real issue because, it's used to determine if we need to upload actor class to GCS. If in a first session we upload it and thus setting session = 0; then in second session, we pass the Actor to a task (fresh worker, session = 0) and invoke the Actor, the worker thinks it's already uploaded and skip the upload, causing actor creation failure.
Versions / Dependencies
master
Reproduction script
Issue Severity
Medium: It is a significant difficulty but I can work around it.
The text was updated successfully, but these errors were encountered: