Generic Python Feedzai OpenML Provider

Contains classes and logic related with the import of a classifier generated in Python

License

License

Categories

Categories

Python Languages
GroupId

GroupId

com.feedzai
ArtifactId

ArtifactId

openml-generic-python
Last Version

Last Version

0.3.0
Release Date

Release Date

Type

Type

jar
Description

Description

Generic Python Feedzai OpenML Provider
Contains classes and logic related with the import of a classifier generated in Python
Project Organization

Project Organization

Feedzai

Download openml-generic-python

How to add to project

<!-- https://jarcasting.com/artifacts/com.feedzai/openml-generic-python/ -->
<dependency>
    <groupId>com.feedzai</groupId>
    <artifactId>openml-generic-python</artifactId>
    <version>0.3.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.feedzai/openml-generic-python/
implementation 'com.feedzai:openml-generic-python:0.3.0'
// https://jarcasting.com/artifacts/com.feedzai/openml-generic-python/
implementation ("com.feedzai:openml-generic-python:0.3.0")
'com.feedzai:openml-generic-python:jar:0.3.0'
<dependency org="com.feedzai" name="openml-generic-python" rev="0.3.0">
  <artifact name="openml-generic-python" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.feedzai', module='openml-generic-python', version='0.3.0')
)
libraryDependencies += "com.feedzai" % "openml-generic-python" % "0.3.0"
[com.feedzai/openml-generic-python "0.3.0"]

Dependencies

compile (2)

Group / Artifact Type Version
com.feedzai : openml-python-common jar 0.3.0
com.google.auto.service : auto-service jar 1.0-rc2

provided (5)

Group / Artifact Type Version
com.feedzai : openml-api jar 1.1.0
com.feedzai : openml-utils jar 1.1.0
com.google.guava : guava jar
com.fasterxml.jackson.core : jackson-databind jar 2.6.7
com.fasterxml.jackson.core : jackson-annotations jar 2.6.7

test (4)

Group / Artifact Type Version
com.fasterxml.jackson.core : jackson-core jar 2.6.7
com.feedzai : openml-utils test-jar 1.1.0
junit : junit jar 4.13.1
org.assertj : assertj-core jar 3.7.0

Project Modules

There are no modules declared in this project.

Feedzai OpenML Providers for Python

Build Status codecov Codacy Badge

Implementations of the Feedzai OpenML API to allow support for machine learning models in Python using Java Embedded Python.

Modules

Generic Python

Maven metadata URI

The openml-generic-python module contains a provider that allows developers to load Python code that conforms to a simple API. This is the most powerful approach (yet more cumbersome) since models can actually hold state.

Pull the provider from Maven Central:

<dependency>
  <groupId>com.feedzai</groupId>
  <artifactId>openml-generic-python</artifactId>
  <!-- See project tags for latest version -->
  <version>0.3.0</version>
</dependency>

Scikit-learn

Maven metadata URI

The implementation in the openml-scikit module adds support for models built with scikit-learn.

Pull this module from Maven Central:

<dependency>
  <groupId>com.feedzai</groupId>
  <artifactId>openml-scikit</artifactId>
  <!-- See project tags for latest version -->
  <version>0.3.0</version>
</dependency>

Building

This is a Maven project which you can build using the following command:

mvn clean install

Environment

To use these providers you need to have Python 3.6 with the following packages installed in your environment:

* numpy 
* scipy
* jep (this requires JAVA_HOME to be configured)
* scikit-learn (for the scikit provider)

Note that this section only describes the known prerequisites that are common to any model generated in Python. Before importing a model you need to ensure that the required packages for that model are also installed.

Running the tests

To actually run the tests, two other configurations may be necessary for Jep to work properly:

  • The java.library.path property needs to point to the Jep library. An approach for this that typically works is setting the LD_LIBRARY_PATH environment variable: export LD_LIBRARY_PATH=/...path to.../python3.6/site-packages/jep:$LD_LIBRARY_PATH

  • Depending on the environment and package manager it may also be necessary to set the LD_PRELOAD variable to include the Python library: export LD_PRELOAD=/...path to.../lib/libpython3.6m.so

Feedzai has built a helpful docker image for testing, available on docker hub, that is being used in this repository's continuous integration. See the travis-ci configuration commands on how to use it. The image's Dockerfile also provides an example of the environment installation.

com.feedzai

Feedzai

Versions

Version
0.3.0
0.2.2
0.2.1
0.2.0
0.1.7
0.1.6
0.1.5
0.1.4
0.1.3
0.1.2
0.1.1
0.1.0