Build local training or execution runner
To build a local training or execution runner and execute from the command line, perform the following steps:
Create an ML SDK project and add the following plugins to the Maven's
pom.xml:<plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>appassembler-maven-plugin</artifactId> <version>1.10</version> <configuration> <programs> <program> <name>runner</name> <mainClass>$MAIN_CLASS</mainClass> <!--<mainClass>com.wf.ml.run.ModelTrainingRunner</mainClass>--> </program> </programs> <assembleDirectory>runner</assembleDirectory> <repositoryName>lib</repositoryName> <repositoryLayout>flat</repositoryLayout> </configuration> <executions> <execution> <id>assembly</id> <phase>package</phase> <goals> <goal>assemble</goal> </goals> </execution> </executions> </plugin> <plugin> <artifactId>maven-clean-plugin</artifactId> <configuration> <filesets> <fileset> <directory>runner</directory> </fileset> </filesets> </configuration> </plugin>To generate a runner script, run the execution command:
mvn clean install
note
- Replace
$MAIN_CLASSwith the path to your runner, for example:com.wf.ml.run.ModelTrainingRunner - By default, the runner directory is created in the base directory but it can be modified.
- As a result,
runner.batandrunner.share generated for Windows and UNIX based OS. - There is a clean plugin. You need to specify a runner directory to be deleted on the following compilation.