简体   繁体   中英

GCP AI Notebook can't access storage bucket

New to GCP. Trying to load a saved model file into an AI Platform notebook. Tried several approaches without success.

Most obvious approach seemed to be to set the value of a variable to the path copied from storage:

model_path = "gs://<my-bucket>/models/3B/export/1600635833/saved_model.pb"

Results: OSError: SavedModel file does not exist at: (the above path)

I know I can connect to the bucket and retrieve contents because I downloaded a csv file from the bucket and printed out the contents.

According to the GCP documentation enter here , you are able to access Cloud Storage. This page will guide to using Cloud Storage with AI Platform Training.

OSError to me sounds like you are trying to access GCS bucket with a regular file system which do not support looking at GCS. (Example: Python open() function)

To access files in GCS I recommend you use the Client Libraries. https://cloud.google.com/storage/docs/reference/libraries

Another option for testing is to try to connect to SSH and use gsutil command.

Note : I assume <my-bucket> was edited to replace your real GCS bucket name.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM