Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jenkinsci/machine-learning-plugin

A Jenkins plugin that helps to ease the Machine Learning workflow .
https://github.com/jenkinsci/machine-learning-plugin

ci jenkins machine-learning

Last synced: 20 days ago
JSON representation

A Jenkins plugin that helps to ease the Machine Learning workflow .

Awesome Lists containing this project

README

        

////
~ The MIT License

~ Copyright 2020 Loghi Perinpanayagam.

~ Permission is hereby granted, free of charge, to any person obtaining a copy
~ of this software and associated documentation files (the "Software"), to deal
~ in the Software without restriction, including without limitation the rights
~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
~ copies of the Software, and to permit persons to whom the Software is
~ furnished to do so, subject to the following conditions:

~ The above copyright notice and this permission notice shall be included in
~ all copies or substantial portions of the Software.

~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
~ THE SOFTWARE.
////

[[machine-learning-plugin]]
= Machine Learning Plugin
:toc: macro

link:https://ci.jenkins.io/job/Plugins/job/machine-learning-plugin/job/master/[image:https://ci.jenkins.io/job/Plugins/job/machine-learning-plugin/job/master/badge/icon[Build]]
link:https://github.com/jenkinsci/machine-learning-plugin/graphs/contributors[image:https://img.shields.io/github/contributors/jenkinsci/machine-learning-plugin.svg?color=blue[Contributors]]
link:https://gitter.im/jenkinsci/gsoc-machine-learning-project[image:https://badges.gitter.im/jenkinsci/machine-learning-plugin.svg[Gitter]]

image:docs/images/jenkins-machine-learning-logo.png[]

== Overview

The main goal of this project is integrating Machine Learning workflow including Data preprocessing, Model Training, Evaluation and Prediction with Jenkins build tasks. This plugin is capable of executing code fragments via IPython kernel as currently supported by Jupyter.

=== Usage

==== Prerequisites

- Following python libraries are required. If not -> install using,

[source,bash]
----
pip install jupyter
pip install protobuf
pip install grpcio
----

- For **Anaconda** environment need to install grpcio as Jupyter is already included in anaconda. For grpcio version >= 1.12 and need to install protobuf separately.

[source,bash]
----
pip install protobuf
pip install grpcio
----

> DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained.

==== Configure IPython kernel

* Kernel language name (Eg: python, ir, javascript etc)
* Language should be alphanumeric and contains only `_` as a special character (Optional)
* Connection establishing timeout in seconds
* Max number of data frames in rows

image:docs/images/global_config.png[configuration]

==== Add Jupyter Notebooks

* Copy Jupyter Notebook to the workspace

* Convert Jupyter Notebooks to `Python / JSON` files and save in the workspace

image:docs/images/file_parser.png[notebook]

==== Build Notebook

* Choose a name for the Machine Leaning task folder (Eg: Training)
* Choose the language kernel
* Use text editor to run code directly
* Use file path to run Jupyter Notebook or script file

image:docs/images/file_builder.png[builder]

* Tips for smooth interpretation

** Install link:https://github.com/jenkinsci/ansicolor-plugin[ANSI-Color plugin] for rich formatted output
** Aware of permissions for accessing I/O in the python code
** Make sure about `import` libraries used in the code installed properly
** If there is any HTML/Images as outputs, all will be saved in the workspace under the Machine Leaning task folder

==== Images and HTMLs

Images and HTMLs in the notebook will be saved in the workspace.
Those artifacts can be viewed using the action in the left side panel.

image:docs/images/image_view.png[image_and_htmls]

=== Troubleshooting

If you are having trouble viewing the HTML files saved, check your browser console to see if there are any errors about Content Security Policy.
This is often the problem.
If you see the error above, then follow the link link:https://wiki.jenkins.io/display/JENKINS/Configuring+Content+Security+Policy[Resolve issues on CSP] for instructions on how to resolve.

=== Contributing to the Plugin

Please refer to the following link for more details. See link:CONTRIBUTING.adoc[here] .