Skip to content
This repository has been archived by the owner on Jun 14, 2023. It is now read-only.

Commit

Permalink
Created page for test model remotely
Browse files Browse the repository at this point in the history
  • Loading branch information
laramaktub committed Jan 11, 2019
1 parent 481ecfe commit 3cbd68f
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 6 deletions.
1 change: 1 addition & 0 deletions source/user/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ If you want a quickstart guide, please check the following link.

quickstart
try-model-locally
try-model-remotely
develop-model

.. raw:: html
Expand Down
9 changes: 3 additions & 6 deletions source/user/models/image_classification_tf.rst
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ By running the `saliency maps notebook <https://github.com/indigo-dc/image-class
Finally you can `launch a simple webpage <https://github.com/indigo-dc/image-classification-tf/tree/master/imgclas/webpage/README.md>`_ to use the trained classifier to predict images (both local and urls) on your favorite brownser.


Launching the full API
----------------------------
Launching the full DEEPaas API
---------------------------------------

**Preliminaries for prediction**

Expand All @@ -69,8 +69,5 @@ If you want to use the API for prediction, you have to do some preliminary step
* Copy your desired `.models/[timestamp]` to `.models/api`. If there is no `.models/api` folder, the default is to use the last available timestamp.
* In the `.models/api/ckpts` leave only the desired checkpoint to use for prediction. If there are more than one chekpoints, the default is to use the last available checkpoint.

Running the API
--------------------

To access this package's complete functionality (both for training and predicting) through an API you have to follow the instructions here: :ref:`api-integration`
To access this package's complete functionality (both for training and predicting) through the DEEPaaS API you have to follow the instructions here: :ref:`api-integration`

75 changes: 75 additions & 0 deletions source/user/try-model-remotelly.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
.. highlight:: console

*******************
Try a model remotelly
*******************



1. Get Docker
-------------

The first step is having `Docker <https://www.docker.com>`_ installed. To have an up-to-date installation please follow
the `official Docker installation guide <https://docs.docker.com/install>`_.


2. Search for a model in the marketplace
----------------------------------------

The next step is to look for a model
in the `DEEP Open Catalog marketplace <https://marketplace.deep-hybrid-datacloud.eu/>`_
you want to try locally.
The marketplace contains an extensible list of existing models e.g.
`DEEP OC Image Classification <https://marketplace.deep-hybrid-datacloud.eu/models/deep-oc-image-classification-tensorflow.html>`_,
`DEEP OC Retinopathy <https://marketplace.deep-hybrid-datacloud.eu/models/deep-oc-retinopathy.html>`_,
`DEEP OC Massive Online Data Streams <https://marketplace.deep-hybrid-datacloud.eu/models/deep-oc-massive-online-data-streams.html>`_,
`DEEP OC Seed Classification <https://marketplace.deep-hybrid-datacloud.eu/models/deep-oc-seed-classification-theano.html>`_,
`DEEP OC Phytopankton (Theano) <https://marketplace.deep-hybrid-datacloud.eu/models/deep-oc-phytopankton-theano.html>`_,
`DEEP OC Conus Classification <https://marketplace.deep-hybrid-datacloud.eu/models/deep-oc-conus-classification-theano.html>`_,
`DEEP OC dogs breed determination <https://marketplace.deep-hybrid-datacloud.eu/models/deep-oc-dogs-breed-determination.html>`_,
and many more.


3. Get the model
----------------

You will find that each model has an associate Docker container in DockerHub
`DEEP OC Image Classification <https://marketplace.deep-hybrid-datacloud.eu/models/deep-oc-image-classification-tensorflow.html>`_
is associated with `deephdc/deep-oc-image-classification-tf <https://hub.docker.com/r/deephdc/deep-oc-image-classification-tf>`_,
`DEEP OC Massive Online Data Streams <https://marketplace.deep-hybrid-datacloud.eu/models/deep-oc-massive-online-data-streams.html>`_
is associated with `deephdc/deep-oc-mods <https://hub.docker.com/r/deephdc/deep-oc-mods>`_, etc.

Let call the model you selected ``deep-oc-model_of_interest``.
Please, download the container with:

::

$ docker pull deephdc/deep-oc-model_of_interest

4. Run the model
----------------

Run the container with:
::

$ docker run -ti -p 5000:5000 deephdc/deep-oc-model_of_interest

5. Go to the API, get the results
---------------------------------

Once running, point your browser to `http://127.0.0.1:5000/ <http://127.0.0.1:5000/>`_
and you will see the API documentation,
where you can test the model functionality, as well as perform other actions.

All models in the `DEEP Open Catalog marketplace <https://marketplace.deep-hybrid-datacloud.eu/>`_
utilize `DEEPaaS API <https://github.com/indigo-dc/DEEPaaS>`_.
The API enables a user friendly interaction with the underlying Deep Learning models and
can be used both for training and inference with the models.

.. image:: ../_static/deepaas.png

The concrete results can vary from model to model e.g.
the results of ``deephdc/deep-oc-image-classification-tf`` are image type(s) and picture(s),
the results of ``deephdc/deep-oc-mods`` are predicted values (float numbers).

0 comments on commit 3cbd68f

Please sign in to comment.