Here we provide a guide for you to run AI related examples based on CloudTik AI runtime which includes selected ML/DL frameworks and libraries.
We provide these examples in two forms:
- Python jobs
- Jupyter notebooks
This example runs Spark distributed deep learning with Hyperopt, Horovod and Tensorflow Keras API. It trains a simple ConvNet on the MNIST dataset using Keras + Horovod using Cloudtik Spark Runtime.
Download Spark Deep Learning with Horovod and Tensorflow Keras and execute:
cloudtik submit /path/to/your-cluster-config.yaml local-download-path/mnist-keras-spark-horovod-hyperopt-mlflow.py -f "your-cloud-storage-fsdir"
Replace the cloud storage fsdir with the workspace cloud storage uri or hdfs dir. For example S3, "s3a://cloudtik-workspace-bucket"
This example runs Spark distributed training using scikit-learn. It illustrates a complete end-to-end example of loading data, training a model, distributed hyperparameter tuning, and model inference under CloudTik Spark cluster. It also illustrates how to use MLflow and model Registry.
Download Spark Machine Learning with Scikit-Learn and execute:
cloudtik submit /path/to/your-cluster-config.yaml local-download-path/iris-scikit_learn-spark-hyperopt-mlflow.py -f "your-cloud-storage-fsdir"
Replace the cloud storage fsdir with the workspace cloud storage uri or hdfs dir. For example S3, "s3a://cloudtik-workspace-bucket"
This notebook example runs Spark distributed deep learning with Hyperopt, Horovod and Tensorflow Keras API. It trains a simple ConvNet on the MNIST dataset using Keras + Horovod using Cloudtik Spark Runtime.
- Upload notebook Spark Deep Learning with Horovod and Tensorflow Keras to JupyterLab. You can also download and cloudtik rsync-up the file to ~/jupyter of cluster head:
cloudtik rsync-up /path/to/your-cluster-config.yaml local-download-path/mnist-keras-spark-horovod-hyperopt-mlflow.ipynb '~/jupyter/mnist-keras-spark-horovod-hyperopt-mlflow.ipynb'
-
Open this notebook on JupyterLab, and choose the Python 3 kernel to run the notebook.
-
Optionally, you can check the training experiments and model registry through MLflow Web UI after the notebook finishes.
This notebook example runs Spark distributed training using scikit-learn. It illustrates a complete end-to-end example of loading data, training a model, distributed hyperparameter tuning, and model inference under CloudTik Spark cluster. It also illustrates how to use MLflow and model Registry.
- Upload notebook Spark Machine Learning with Scikit-Learn to JupyterLab. You can also download and cloudtik rsync-up the file to ~/jupyter of cluster head:
cloudtik rsync-up /path/to/your-cluster-config.yaml local-download-path/iris-scikit_learn-spark-hyperopt-mlflow.ipynb '~/jupyter/iris-scikit_learn-spark-hyperopt-mlflow.ipynb'
-
Open this notebook on JupyterLab, and choose the Python 3 kernel to run the notebook.
-
Optionally, you can check the training experiments and model registry through MLflow Web UI after the notebook finishes.