Giter Club home page Giter Club logo

machine-learning-using-k8s's Introduction

Machine Learning Frameworks on Kubernetes

This repository explains how to run different Machine Learning frameworks on Amazon EKS.

Other Notes

machine-learning-using-k8s's People

Contributors

arun-gupta avatar goswamig avatar jeffwan avatar lupesko avatar vdantu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

machine-learning-using-k8s's Issues

TensorFlow training for MNIST is failing

TensorFlow training is giving the following error:

$ kubectl logs tensorflow
python: can't open file '/tmp/models/official/mnist/mnist.py --export_dir /model/': [Errno 2] No such file or directory

This requires a PV to be created and then the model will be generated there instead.

Trim the number of logging instructions

Running TensorFlow + Keras training on Fashion-MNIST shows the following logging statements:

Epoch 1/40
2019-04-16 20:15:01.033264: I tensorflow/core/platform/s3/aws_logging.cc:54] Found secret key
2019-04-16 20:15:01.033390: I tensorflow/core/platform/s3/aws_logging.cc:54] Connection has been released. Continuing.
2019-04-16 20:15:01.077391: I tensorflow/core/platform/s3/aws_logging.cc:54] Found secret key
2019-04-16 20:15:01.077490: I tensorflow/core/platform/s3/aws_logging.cc:54] Connection has been released. Continuing.
2019-04-16 20:15:01.083669: I tensorflow/core/platform/s3/aws_logging.cc:54] Found secret key
2019-04-16 20:15:01.083754: I tensorflow/core/platform/s3/aws_logging.cc:54] Connection has been released. Continuing.

Here is the command to create the pod:

kubectl create -f samples/mnist/training/tensorflow/mnist_train.yaml

This can be trimmed in TensorFlow setup.

@Jeffwan will look at this

Deployment of entire stack using CDK

Create a CDK stack with the following components:

  • GPU-powered EKS cluster
  • Install KubeFlow
  • Create MXNet construct
  • Create ML pipelines for training and prediction

Move to aws-labs and rename repo

I think aws-samples might not be appropriate for this repo now. Since this is a full tutorial rather than some code snippets blog uses. We should move to aws-labs and rename repo to some names like "kubeflow-lab" or "kubeflow-on-eks"

Serverless inference

Create a code sample that shows using k8s for training and Fargate for inference.

Update model version number for TensorFlow + Keras training

Training Fashion-MNIST model using TensorFlow and Keras as explained at

Running the training gives:

Test accuracy: 0.885599970818
Traceback (most recent call last):
  File "mnist.py", line 89, in <module>
    main()
  File "mnist.py", line 86, in main
    export_model(model, args.model_export_path)
  File "mnist.py", line 69, in export_model
    outputs={t.name:t for t in model.outputs})
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/util/deprecation.py", line 324, in new_func
    return func(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/saved_model/simple_save.py", line 83, in simple_save
    b = builder.SavedModelBuilder(export_dir)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/saved_model/builder_impl.py", line 425, in __init__
    super(SavedModelBuilder, self).__init__(export_dir=export_dir)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/saved_model/builder_impl.py", line 100, in __init__
    "directory: %s" % export_dir)
AssertionError: Export directory already exists. Please specify a different export directory: s3://eks-ml-example/mnist/export/1

This error message should not come. Instead the model should be persisted with a new version number.

@Jeffwan will look into this

Add more advanced use cases

Kubeflow community is growing fast. This repository covers basic tutorial for users.
I think strategy for next step is to

  • bring different phases of machine learning into picture like data loading, model management and experiment, A/B testing.
  • integrate with existing AWS services and simplify user's setup.

Action items could be

  1. Integration with EKS component, like how to easily setup PV using CSI Plugin, Ingress Controller.
  2. Integration with AWS services, like JupyterHub authentication, logs backend.
  3. Integrated E2E production ready solution. Multi-tenancy support, Traffic management(Istio), metrics and log solution, CI/CD.

Once these things done, we can contribute back to community.

Update tutorial in a Kubeflow way?

I notice some of examples are for generic purpose like how to deploy Jupyter notebook, enable TensorBoard and also serving part. On the contrary, as Kubeflow community grows fast, these components are included in the latest kubeflow suite. I want to update these tutorials in a kubeflow way and I think it will help customers better leverage entire ML pipeline on EKS.

What do you think?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.