Core Java library for accessing the UFDL backend, managing the communication and executing actions.
The following modules are available
- ufdl4j-core - core API calls (users, teams, projects, datasets)
- ufdl4j-image - image API calls (image classification, image segmentaiton, object detection)
- ufdl4j-speech - speech API calls
com.github.waikatoufdl.ufdl4j.action.Users
- managing userscom.github.waikatoufdl.ufdl4j.action.Teams
- managing teamscom.github.waikatoufdl.ufdl4j.action.Projects
- managing projectscom.github.waikatoufdl.ufdl4j.action.Datasets
- managing datasetscom.github.waikatoufdl.ufdl4j.action.Licenses
- managing licenses (must be admin to add licenses)com.github.waikatoufdl.ufdl4j.action.Log
- managing log entriescom.github.waikatoufdl.ufdl4j.action.Domains
- managing domainscom.github.waikatoufdl.ufdl4j.action.CudaVersions
- managing CUDA versionscom.github.waikatoufdl.ufdl4j.action.Frameworks
- managing frameworkscom.github.waikatoufdl.ufdl4j.action.HardwareGenerations
- managing hardware generationscom.github.waikatoufdl.ufdl4j.action.DockerImages
- managing docker imagescom.github.waikatoufdl.ufdl4j.action.PretrainedModels
- managing pretrained modelscom.github.waikatoufdl.ufdl4j.action.Nodes
- managing nodescom.github.waikatoufdl.ufdl4j.action.JobTypes
- managing job typescom.github.waikatoufdl.ufdl4j.action.JobTemplates
- managing job templatescom.github.waikatoufdl.ufdl4j.action.Jobs
- managing jobscom.github.waikatoufdl.ufdl4j.action.Generic
- for generic API calls
com.github.waikatoufdl.ufdl4j.action.ImageClassificationDatasets
- managing image classification datasetscom.github.waikatoufdl.ufdl4j.action.ImageSegmentationDatasets
- managing image segmentation datasetscom.github.waikatoufdl.ufdl4j.action.ObjectDetectionDatasets
- managing object classifications datasets
com.github.waikatoufdl.ufdl4j.action.SpeechDatasets
- managing speech datasets
Instantiating the client for communicating with the backend:
import com.github.waikatoufdl.ufdl4j.Client;
import com.github.waikatoufdl.ufdl4j.action.Users.User;
public static class Test {
public static void main(String[] args) throws Exception {
// instantiate client (automatically refreshes/obtains API tokens when executing actions)
Client client = new Client("http://127.0.0.1:8000", "USER", "PW");
}
}
The core actions that can be accessed via the client:
client.users()
- user managementclient.teams()
- team managementclient.projects()
- project managementclient.datasets()
- (core) dataset managementclient.licenses()
- licenses managementclient.log()
- log managementclient.domains()
- domain managementclient.cuda()
- CUDA version managementclient.frameworks()
- framework managementclient.hardware()
- hardware generations managementclient.docker()
- docker image managementclient.pretrainedModels()
- pretrained model managementclient.nodes()
- node managementclient.jobTypes()
- job type managementclient.jobTemplates()
- job template managementclient.jobs()
- job management
import com.github.waikatoufdl.ufdl4j.Client;
import com.github.waikatoufdl.ufdl4j.action.Users.User;
import com.github.waikatoufdl.ufdl4j.action.Teams.Team;
import com.github.waikatoufdl.ufdl4j.action.Projects.Project;
import com.github.waikatoufdl.ufdl4j.action.Datasets.Dataset;
import com.github.waikatoufdl.ufdl4j.action.Licenses.License;
import com.github.waikatoufdl.ufdl4j.action.Log.LogEntry;
public static class Test {
public static void main(String[] args) throws Exception {
Client client = new Client("http://127.0.0.1:8000", "USER", "PW");
// output all users
System.out.println("\nUsers:");
for (User user: client.users().list()) {
System.out.println(user);
}
// output all teams
System.out.println("\nTeams:");
for (Team team: client.teams().list()) {
System.out.println(team);
}
// output all projects
System.out.println("\nProjects:");
for (Project project: client.projects().list()) {
System.out.println(project);
}
// output all datasets
System.out.println("\nDatasets:");
for (Dataset dataset: client.datasets().list()) {
System.out.println(dataset);
}
// output all licenses
System.out.println("\nLicenses:");
for (License license: client.licenses().list()) {
System.out.println(license);
}
// output all log entries
System.out.println("\nLog:");
for (LogEntry entry: client.log().list()) {
System.out.println(entry);
}
}
}
Additional actions can be accessed as follows (get cached):
import com.github.waikatoufdl.ufdl4j.Client;
import com.github.waikatoufdl.ufdl4j.action.ObjectDetectionDatasets;
import com.github.waikatoufdl.ufdl4j.action.ObjectDetectionDatasets.Annotations;
import java.util.Map;
public static class Test {
public static void main(String[] args) throws Exception {
Client client = new Client("http://127.0.0.1:8000", "USER", "PW");
Dataset dataset = client.dataets().load(11); // load dataset with primary key (PK) 11
ObjectDetectionDatasets objdet = client.action(ObjectDetectionDatasets.class);
Map<String,Annotations> all = objdet.getAnntations(dataset); // load annotations for all images in dataset
}
}
- FilterExample - general filter example (filtering requires knowledge of field names used by backend API)
- ManagingUsers - listing, creating, deleting users
- ManagingTeams - same for teams
- ManagingProjects - same for projects
- ManagingDatasets - basic dataset operations
- ManagingLicenses - license operations
- ManagingLogEntries - backend log operations
- ManagingDomains - domain operations
- ManagingCudaVersions - CUDA version operations
- ManagingFrameworks - framework operations
- ManagingHardwareGenerations - hardware generations operations
- ManagingDockerImages - docker image operations
- ManagingPretrainedModels - pretrained models operations
- ManagingNodes - node operations
- ManagingJobTypes - job type operations
- ManagingJobTemplates - job template operations
- ManagingJobs - job operations
- ManagingImageClassificationDatasets - operations on image classification datasets
- ManagingImageSegmentationDatasets - operations on image segmentation datasets
- ManagingObjectDetectionDatasets - same, but for object detection datasets
- ManagingSpeechDatasets - operations on speech datasets