Skip to content

Commit

Permalink
refactored model controller
Browse files Browse the repository at this point in the history
  • Loading branch information
amoldavsky committed May 17, 2021
1 parent 69942e4 commit a353cc8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
package io.seldon.wrapper.api;

/**
* This is a model prediction API and container everything related to predictions.
*
* NOTE:
* This is NOT a RestFull API, since there is no resource or state (aka there is no prediction object or state)
* involved.
*/

import com.google.protobuf.InvalidProtocolBufferException;
import io.seldon.protos.PredictionProtos.Feedback;
import io.seldon.protos.PredictionProtos.SeldonMessage;
Expand All @@ -19,8 +27,8 @@

@RestController
@ConditionalOnExpression("${seldon.api.model.enabled:false}")
public class ModelRestController {
private static Logger logger = LoggerFactory.getLogger(ModelRestController.class.getName());
public class ModelPredictionController {
private static Logger logger = LoggerFactory.getLogger(ModelPredictionController.class.getName());

@Autowired SeldonPredictionService predictionService;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,12 @@
@RunWith(SpringRunner.class)
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT)
// @AutoConfigureMockMvc
public class RestControllerTest {
public class ModelPredictionControllerTest {

@Autowired private WebApplicationContext context;

@Autowired ModelRestController modelRestController;
@Autowired
ModelPredictionController modelPredictionController;

// @Autowired
private MockMvc mvc;
Expand Down

0 comments on commit a353cc8

Please sign in to comment.