Giter Club home page Giter Club logo

asos_dsf2020's Introduction

Data Science Festival X ASOS

Data Science Festival Workshop 7 November 2020 โ€“ Building a fashion recommender using Tensorflow/Keras with ASOS.

SEE THE /notebooks/README for the Demo notes

DSF_ASOS_Build_and_Deploy_a_Recommender_in_3_Hours_docker.ipynb file This is a docker version of the same ASOS DSF2020 repo - with a (hopefully) correct bit of typing during the demo.

You can save a new version of the recommender and it will be automatically served by tensorflow

The model output from TF serving can be seen via the same notebook - no need for command line on the host

You can switch between versions by using tags or version numbers, again see the notebook for details

To create a new version with different learning parameters or so on then amend the "model_path" to have a new number

Have a look at the models.config to see how this could work

The tf/server refreshes the config file every 15seconds (this can be changed in the docker-compose to be less frequent etc)

To use this you will at least need docker desktop and probably wsl2 containers for it

You can use vscode to clone the repo locally and right click the docker-compose file and choose UP

Visit http://localhost:8888

go to the notebook folder and open the DOCKER version of the notebook

password is hard coded to dsf2020 - see docker file for how this is done

The server runs on port 8501 - but you don't need to worry about that - you can get to the results from the notebook.

To get a different model and serve it - change the path parameter text model_path = "models/recommender/2" to 3/4/5 etc as you play with the epochs/learning rates etc in the model

You can just run every cell in the notebook and it will spit out a model that is on the same path as that being used by the server.

The server checks for new models every 15 seconds

look at notebooks\models\models.config to see how versions work

look at .buildfiles\docker-compose.yml to see how the model file is used in docker startup

The last few cells on the notebook show how to access the latest version, a named version or a version number

If you want to remove the password and use jupyter tokens remove lines 6 and 7 of the docker file that copies the jupyter_notebook_config.json file in to the image

If you just want to change the password afterwards you can login with the token visible when you view the logs of the running container

I have run this on a non-gpu PC using the GPU tagged tensorflow image and it works okay

I have also run this with the CPU (Non gpu) image and it works ok - so you can if you wish remove the gpu tag from the first line of the dockerfile. The download will be much smaller.

asos_dsf2020's People

Contributors

snowdej avatar neha-patel avatar

Watchers

 avatar

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.