modzyClient.submitJobFile
Submit a job using files as inputs
modzyClient.submitJobFile(String modelId, String versionId, List<InputStream> streamSource)
Submits a job based on an InputStream source. It includes files or any other readable stream.
Parameters
Parameter | Type | Description | Example |
---|---|---|---|
modelId | java.lang.String | Model identifier provided by Modzy. | "ed542963de" |
versionId | java.lang.String | The model’s version number. It follows the semantic versioning format. | "1.0.1" |
streamSource | java.util.List<java.io.InputStream> | A list of inputs to process | List<InputStream> inputs = new ArrayList<>(); inputs.add( new FileInputStream("/tmp/some/path")); |
Returns
com.modzy.sdk.model.Job
object with the job status obtained from the server
Examples
List<InputStream> inputs = new ArrayList<>();
inputs.add( new FileInputStream("/tmp/some-file") );
Job job = modzyClient.submitJobFile("ed542963de", "1.0.1", inputs);
More specific customization options are provided by the method [modzyClient.getJobClient.submitJob
]{doc:javamodzyclientsubmitjob}
JobInput<InputStream> jobInput = new JobInputStream();
Map<String,InputStream> mapSource = new HashMap<>();
mapSource.put("input.txt", new FileInputStream( "/usr/inputs/some_file.txt" ));
jobInput.addSource("my-input", mapSource);
Job job = modzyClient.submitJob("ed542963de", "1.0.1", jobInput, false);
Updated almost 2 years ago