Open orcahmlee opened 2 years ago
@cadedaniel would you mind taking a look at this and triaging this issue?
Hi @orcahmlee. I want to thank you for the excellent bug report and reproduction script!
I've looked into this and believe I have the root cause: storage.Client()
succeeds in version 2.2.1 of Google's google-cloud-storage
package, but fails in version 2.3.0. This explains why you saw this failure in a remote Ray function but not locally -- your Mac has the working version, but the Ray node has the up-to-date but failing version.
I downgraded the dependencies on my Ray node to google-cloud-storage 2.2.1 (same as my Mac). Once I did this, your reproduction script no longer crashes.
Does this solution work for you?
Hi @orcahmlee. I want to thank you for the excellent bug report and reproduction script!
I've looked into this and believe I have the root cause:
storage.Client()
succeeds in version 2.2.1 of Google'sgoogle-cloud-storage
package, but fails in version 2.3.0. This explains why you saw this failure in a remote Ray function but not locally -- your Mac has the working version, but the Ray node has the up-to-date but failing version.I downgraded the dependencies on my Ray node to google-cloud-storage 2.2.1 (same as my Mac). Once I did this, your reproduction script no longer crashes.
Does this solution work for you?
Hi @cadedaniel , Sorry for my reproduction script thas was not clear and I already updated it.
In the new reproduction script, within the ray_func
:
storage_client = storage.Client()
---> it will failstorage_client = storage.Client("")
---> it will succeedsThis happened both in google-cloud-storage
package version 2.2.1
and version 2.3.0
.
Would you mind to run the new reproduction script on your Mac with google-cloud-storage 2.2.1
?
What happened + What you expected to happen
I am using Ray to load files from Google Cloud Storage. According to the google-cloud-storage Doc, if not pass
project
, it will fall back to read the credential file from environment variableGOOGLE_APPLICATION_CREDENTIALS
.When I use the normal Python function, it went well.
However, when I wrap this function to Ray remote function, it shows
OSError: Project was not passed and could not be determined from the environment.
The full log is
The workaround I used now is I passed any non-relevant string to the
project
argument and theOSError
won't show.Versions / Dependencies
Reproduction script
Issue Severity
No response