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

Commit

Permalink
develop model
Browse files Browse the repository at this point in the history
  • Loading branch information
giangzuzana committed Jan 9, 2019
1 parent 9f2cc74 commit 37461eb
Show file tree
Hide file tree
Showing 5 changed files with 82 additions and 61 deletions.
75 changes: 75 additions & 0 deletions source/user/develop-model.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
Develop a model using DEEP UC template
======================================

Prepare DEEP UC environment
---------------------------

Install cookiecutter (if not yet done)
::
$ pip install cookiecutter
Run the DEEP UC cookiecutter template
::
$ cookiecutter https://github.com/indigo-dc/cookiecutter-data-science
Answer all questions from DEEP UC cookiecutter template with attentions to
``repo_name`` i.e. the name of your github repositories, etc.

This creates two project directories:
::
~/DEEP-OC-your_project
~/your_project
Go to ``github.com/your_account`` and
create corresponding repositories: ``DEEP-OC-your_project`` and ``your_project``

Do ``git push origin master`` in both created directories. This puts your initial code to ``github``.


Develop a model according to DEEP UC template
---------------------------------------------

The structure of ``your_project`` created using
`DEEP UC template <https://github.com/indigo-dc/cookiecutter-data-science>`__ contains
the following core items needed to develop a model
::
requirements.txt
data/
models/
{{cookiecutter.repo_name}}/dataset/make_dataset.py
{{cookiecutter.repo_name}}/features/build_features.py
{{cookiecutter.repo_name}}/models/model.py
**Installing development requirements**

Modify ``requirements.txt`` according to your needs (e.g. add more libraries) then run
::
$ pip install -r requirements.txt

**Improve the initial code**

You can modify as well as add more source files and put them accordingly into the directory structure.

**1. Make datasets:** source files in this directory aim to manipulate with raw dataset(s).
The output of this step is raw data, which can be cleaned and/or pre-formatted.
::
{{cookiecutter.repo_name}}/dataset/make_dataset.py
{{cookiecutter.repo_name}}/dataset/

**2. Build features** takes the output from the previous step (Make datasets) and
creates ML train, test as well as validation data from raw data.
The concrete realisation is depend on concrete UC, the aim of the application as well as
technological background (e.g. high-performance supports).
::
{{cookiecutter.repo_name}}/features/build_features.py
{{cookiecutter.repo_name}}/features/

**3. Develop models** dealing with the most interesting ML core i.e. modelling.
The most important thing in the ``model.py`` are implementations for DEEP entry points,
which are defined according to :ref:`API methods <user/overview/api:Methods>`.
You don't need to implement all the methods, just the ones you need.
::
{{cookiecutter.repo_name}}/models/model.py
{{cookiecutter.repo_name}}/models/

2 changes: 2 additions & 0 deletions source/user/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ If you want a quickstart guide, please check the following link.
:maxdepth: 1

quickstart
try-model-locally
develop-model

Overview
---------
Expand Down
57 changes: 0 additions & 57 deletions source/user/overview/cookiecutter-develop-model.rst

This file was deleted.

2 changes: 0 additions & 2 deletions source/user/overview/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,5 @@ Overview

architecture
cookiecutter
cookiecutter-develop-model
try-model-locally
user-roles
api
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,21 @@ Try a model locally


2. **Search for a model in the marketplace**
TBD


3. **Get the model**

clone the repo

build the container or get from DockerHub


4. **Run the model**


5. **Go to the API, get the results**
MODS

MODS - probs as outpus

Need reviewing/improvements for other UCs

0 comments on commit 37461eb

Please sign in to comment.