Skip to content

Commit

Permalink
Modularized the project
Browse files Browse the repository at this point in the history
  • Loading branch information
vruusmann committed Jan 29, 2022
1 parent 89d5733 commit e6bf453
Show file tree
Hide file tree
Showing 697 changed files with 237 additions and 103 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ Enter the project root directory and build using [Apache Maven](https://maven.ap
mvn clean install
```

The build produces an executable uber-JAR file `target/jpmml-sklearn-executable-1.7-SNAPSHOT.jar`.
The build produces a library JAR file `pmml-sklearn/target/pmml-sklearn-1.7-SNAPSHOT.jar`, and an executable uber-JAR file `pmml-sklearn-example/target/pmml-sklearn-example-executable-1.7-SNAPSHOT.jar`.

# Usage #

Expand Down Expand Up @@ -498,12 +498,12 @@ Please see the test script file [main.py](https://github.com/jpmml/jpmml-sklearn

Converting the pipeline pickle file `pipeline.pkl.z` to a PMML file `pipeline.pmml`:
```
java -jar target/jpmml-sklearn-executable-1.7-SNAPSHOT.jar --pkl-input pipeline.pkl.z --pmml-output pipeline.pmml
java -jar pmml-sklearn-example/target/pmml-sklearn-example-executable-1.7-SNAPSHOT.jar --pkl-input pipeline.pkl.z --pmml-output pipeline.pmml
```

Getting help:
```
java -jar target/jpmml-sklearn-executable-1.7-SNAPSHOT.jar --help
java -jar pmml-sklearn-example/target/pmml-sklearn-example-executable-1.7-SNAPSHOT.jar --help
```

# Documentation #
Expand Down
81 changes: 81 additions & 0 deletions pmml-sklearn-example/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
<?xml version="1.0" ?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.jpmml</groupId>
<artifactId>jpmml-sklearn</artifactId>
<version>1.7-SNAPSHOT</version>
</parent>

<groupId>org.jpmml</groupId>
<artifactId>pmml-sklearn-example</artifactId>
<packaging>jar</packaging>

<name>JPMML SkLearn converter example applications</name>
<description>JPMML Scikit-Learn to class model converter example command-line applications</description>

<licenses>
<license>
<name>GNU Affero General Public License (AGPL) version 3.0</name>
<url>http://www.gnu.org/licenses/agpl-3.0.html</url>
<distribution>repo</distribution>
</license>
</licenses>

<dependencies>
<dependency>
<groupId>org.jpmml</groupId>
<artifactId>pmml-sklearn</artifactId>
</dependency>

<dependency>
<groupId>com.beust</groupId>
<artifactId>jcommander</artifactId>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<finalName>${project.artifactId}-executable-${project.version}</finalName>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
<resource>META-INF/python2pmml.properties</resource>
</transformer>
<transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
<resource>META-INF/sklearn2pmml.properties</resource>
</transformer>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<manifestEntries>
<Main-Class>org.jpmml.sklearn.example.Main</Main-Class>
<Implementation-Title>JPMML-SkLearn command-line application</Implementation-Title>
<Implementation-Version>${project.version}</Implementation-Version>
</manifestEntries>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* You should have received a copy of the GNU Affero General Public License
* along with JPMML-SkLearn. If not, see <http://www.gnu.org/licenses/>.
*/
package org.jpmml.sklearn;
package org.jpmml.sklearn.example;

import java.io.File;
import java.io.FileOutputStream;
Expand All @@ -35,6 +35,7 @@
import org.jpmml.python.ClassDictUtil;
import org.jpmml.python.PickleUtil;
import org.jpmml.python.Storage;
import org.jpmml.sklearn.SkLearnEncoder;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import sklearn.Estimator;
Expand Down
83 changes: 83 additions & 0 deletions pmml-sklearn/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
<?xml version="1.0" ?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.jpmml</groupId>
<artifactId>jpmml-sklearn</artifactId>
<version>1.7-SNAPSHOT</version>
</parent>

<groupId>org.jpmml</groupId>
<artifactId>pmml-sklearn</artifactId>
<packaging>jar</packaging>

<name>JPMML SkLearn converter</name>
<description>JPMML Scikit-Learn to class model converter</description>

<licenses>
<license>
<name>GNU Affero General Public License (AGPL) version 3.0</name>
<url>http://www.gnu.org/licenses/agpl-3.0.html</url>
<distribution>repo</distribution>
</license>
</licenses>

<dependencies>
<dependency>
<groupId>org.jpmml</groupId>
<artifactId>pmml-evaluator-testing</artifactId>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.jpmml</groupId>
<artifactId>pmml-h2o</artifactId>
</dependency>

<dependency>
<groupId>org.jpmml</groupId>
<artifactId>pmml-lightgbm</artifactId>
</dependency>

<dependency>
<groupId>org.jpmml</groupId>
<artifactId>pmml-python</artifactId>
</dependency>
<dependency>
<groupId>org.jpmml</groupId>
<artifactId>pmml-python-testing</artifactId>
</dependency>

<dependency>
<groupId>org.jpmml</groupId>
<artifactId>pmml-xgboost</artifactId>
</dependency>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.2.0</version>
<configuration>
<archive>
<manifestEntries>
<Implementation-Title>JPMML-SkLearn library</Implementation-Title>
<Implementation-Version>${project.version}</Implementation-Version>
</manifestEntries>
</archive>
<excludes>
<exclude>*.py</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
</project>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit e6bf453

Please sign in to comment.