Skip to content

Conversation

@robertnishihara
Copy link
Collaborator

In some cases, functions exported from the driver are run on the driver twice (once right when they are exported and then once when they are later imported on the same driver). We should not be importing them at all and definitely should not be executing them a second time.

Before this PR:

import ray
import sys

ray.init()

def f(x):
    sys.path.append(1)

ray.worker.global_worker.run_function_on_all_workers(f)

import time
time.sleep(1)

print(sys.path)  # This used to end with [1, 1] before this PR. It should be [1].

Related to #2406.

@robertnishihara
Copy link
Collaborator Author

cc @surehb

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/7874/
Test FAILed.

@robertnishihara robertnishihara deleted the fiximport branch November 17, 2018 02:20
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