How to Work with Google Cloud Platform Projects
If you want to take advantage of the Google Cloud Platform (GCP)’s features, the first step is to create a project. This project serves as the central container of your development effort and includes all your metadata and configuration files. Before you can execute code or launch a web application, you need to upload the files to your project. Similarly, if you’d like access to special features, you need to make requests through the project.
To build a GCP project that can access the ML Engine, you need to perform three steps:
- Create a project in the Google Developer Console.
- Enable billing for the project.
- Enable the project to access the Machine Learning Engine.
Creating a new project
Anyone with a valid email address can create a GCP project without any fees or obligations. The process involves five steps:
- Visit the Cloud Console.
- If this is your first time visiting the console, provide a contact email address and a password.
- In the upper horizontal bar, click Select a Project.
- In the Select dialog box, click the plus button on the right.
- In the New Project page, enter a project name and click the Create button.
When working with the GCP, you need to understand the difference between a project’s name and ID. A project’s name is chosen by the developer, and the console uses it to display the current project.
In contrast, a project’s ID is chosen by the GCP based on the project’s name, and it uniquely identifies the project across all projects in the GCP. If you want to upload code or change a project’s configuration, you’ll need to access your project by its ID. Therefore, it’s a good idea to know the IDs of your projects.
Machine learning is a powerful capability, but unlike TensorFlow, it’s not free. Google’s fees for machine learning depend on three factors: the type of operation (training or prediction), the length of time, and your location:
- Training: $0.49 per hour per training unit in the U.S., $0.54 in Europe and Asia
- Prediction: $0.10 per thousand predictions plus $0.40 per hour in the U.S., $0.11 per thousand predictions plus $0.44 per hour in Europe and Asia
Google charges money after you use the ML Engine, not in advance. But you need to identify a means of payment before you use the engine, and you can configure this by associating your project with a billing account:
- Visit your project page in the Cloud Console.
- Open the menu (three horizontal bars) in the upper-left and select the Billing option.
- Click the button entitled Add billing account.
- Enter your contact information and billing information.
At the bottom of the page, a button lets you set up automatic payment, which authorizes Google to withdraw funds from the account as resources are used.
Accessing the machine learning engine
After you set up a billing account for your project, you can access paid features like the ML Engine. To enable this feature, open the menu in the upper-left of the project page and select APIs & Services. This opens the APIs & Services page, which identifies the features that the project can access.
The left side of the page displays three links: Dashboard, Library, and Credentials. The Library link opens a page that lists the APIs available for your project. To enable access to the ML Engine, you need to perform five steps:
- From the APIs & Services page, click the Library link to the left.
- Find the Machine Learning group and click the View All link to the right.
- Click the link entitled Google Cloud Machine Learning Engine.
- Click the Enable link at the top of the page.
- Wait until the GCP grants access to the new capability.
After performing these steps, you can verify that your project can access the ML Engine by visiting the APIs & Services dashboard. The lower part of the page lists the different APIs your project can access, and this should include Google Cloud Storage and the Google Cloud Machine Learning Engine.