Challenge Overview
Challenge overview
In this challenge, we are going to create one API for predict if one challenge will success or not.
CHALLENGE BACKGROUND
Thanks to the amazing work from the community, Topcoder has been running many challenges over the past few years.
Topcoder is reaching out to our creative Topcoder community to
- Research on the historical challenge data
- Build ML workflow using AWS Sagemaker
- Use ML technology to help with
- Easy Topcoder challenge management
- Increase challenge success rates. Challenge success here means one challenge gets one successful submission (winner) in the end.
Technology Stack
- Nodejs 12
- Express
Individual requirements
The API accepts
POST "/predict", body {"challengeId": "", "model": ""}
model is optional
response is {"prediction": "success or fail"}
After receiving request,
use https://www.npmjs.com/package/@topcoder-platform/topcoder-api-challenges-v4-wrapper to fetch challenge info from challenge api by challenge id.
Use model field to decide which model we are going to use for prediction. If no model field is provided, use default model.
Please create a common prediction response interface so that all predictions from different models have the same response.
After deciding which model to use, we simply call model.predict to get PredictionResponse.
This means for each model, create a separate file. The file should include methods to
- predict(challenge info)
- create request body from challenge data
- send request to model endpoint
In config, there are at least these configurations
{ DEFAULT_MODEL: "default model name", MODELS: { "model name" : { "url": "model endpoint", "path": "model file path", "enabled": true of false } }
Important Notes
- Use async await pattern.
- Use standard as your linter. Ensure there are no lint errors in your submission.
- Typescript is not allowed. No build or compilation of code is expected.
- Returns error status code with meaningful error message in response
- No tests are needed.