Examples of using Google Cloud-ML

Brief introduction

Google launched its Cloud-ML deep-learning service and has open-sourced samples of corresponding Example code in Github. The address is https://github.com/GoogleCloudPlatform/cloudml-samples.

The Xiaomi Cloud-ML service supports standard TensorFlow applications and also employs standard Python packaging methods to support the submission of Google Cloud-ML code samples directly to Xiomi Cloud-ML services.

Examples of executing Cloud-ML code

We can test Google Cloud-ML code sample locally and run the TensorFlow application module directly after downloading the source code. To avoid the time-consuming download process, we use fake data here.

git clone https://github.com/GoogleCloudPlatform/cloudml-samples

cd ./cloudml-samples/mnist/trainable/

python -m trainer.task --fake_data True

Package TensorFlow Applications

Setup.py is already available among the examples of code provided by Google Cloud-ML. We can bundle it directly into a standard Python compressed package for direct submission to the Google Cloud-ML or Xiaomi Cloud-ML services.

python setup.py sdist --format=gztar

Use the Xiaomi Cloud-ML service

To test the compatibility of the Xiaomi Cloud-ML service, we bundled the Google Cloud-ML open-source code sample directly into the Xiaomi object storage service, then submitted the TensorFlow application in the compressed package directly to Xiaomi Cloud-ML and trained in the cloud.

cloudml jobs submit -n mnist1 -m trainer.task -u fds://cloud-ml/google_cloudml_mnist_trainable/trainer-1.0.tar.gz -a "--fake_data True"

Once the task was submitted, we could examine the training log to see whether the parameter injection, model training or log output was the same locally. Similar results could be obtained by submitting this file to the Google Cloud-ML service.

Conclusion

In conclusion, thanks to the standard Python packaging approach, we can unify the abstraction of TensorFlow and even of other applications using Cloud-ML frameworks. Google Cloud-ML and Xiaomi Cloud-ML support for this format ensures that users are not bound to any specific service providers, as the same set of code can even be used to seamlessly switch between service providers or to perform disaster recovery testing among different service providers.

Supports the open-source standard TensorFlow application, enabling users to transfer the locally running TensorFlow code directly to the cloud training, thereby leveraging the advantages of cloud computing in respect of resource sharing, on-demand billing and high-performance GPU computation. Compatible with the Google Cloud-ML application code, which the migration and sharing of algorithms and applications among cloud service providers.