org.deeplearning4j.ui.rl.RlResource Maven / Gradle / Ivy
package org.deeplearning4j.ui.rl;
import org.deeplearning4j.berkeley.Pair;
import org.deeplearning4j.ui.rl.beans.ReportBean;
import org.deeplearning4j.ui.storage.HistoryStorage;
import javax.ws.rs.*;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
/**
* Almost RESTful interface for FlowIterationListener.
*
* @author [email protected]
*/
@Path("/rl")
public class RlResource {
//private SessionStorage storage = SessionStorage.getInstance();
private HistoryStorage storage = HistoryStorage.getInstance();
private String key = "RL";
@GET
@Path("/state")
@Produces(MediaType.APPLICATION_JSON)
public Response getState(@QueryParam("sid") String sessionId) {
// FIXME: getSorted should use derived types!
List