Open KingJam opened 5 years ago
This is what I have been thinking of in terms of the domain model and the Math Service API.
Domain Model addition
{
"activity_id": "main1234567",
"activity_type": "MATH_SINGLE_NUMERIC_ANSWER",
"question": "LIMIT[x^2 - 1/x - 1, X->0]",
"answers": ["-1"],
"sub_activities": [{
"activity_id": "abc123",
"activity_type": "MATH_STEP_HINT",
"hint_text": "a+b=c",
"referenced_activity": "main1234567"
},
{
"activity_id": "xyz456",
"activity_type": "MATH_STEP_HINT",
"hint_text": "d+e=f",
"referenced_activity": "main1234567"
},
{
"activity_id": "www789",
"activity_type": "MATH_PLOT_HINT",
"hint_url": "https://plot.com/image123.png",
"referenced_activity": "main1234567"
}
]
}
Note that this structure is similar to what was done on microtutor. I figured that it wouldn't hurt to represent this activity as such since we eventually want to move to this more generic type model. The sub_activities
serve as hints to the main activity.
Initial Math API request
{
"last_activity_id": "main1234567",
"activity": {
"activity_id": "main1234567",
"activity_type": "MATH_SINGLE_NUMERIC_ANSWER",
"question": "LIMIT[x^2 - 1/x - 1, X->0]",
"answers": ["-1"],
"sub_activities": [{
"activity_id": "abc123",
"activity_type": "MATH_STEP_HINT",
"hint_text": "a+b=c",
"referenced_activity": "main1234567"
},
{
"activity_id": "xyz456",
"activity_type": "MATH_STEP_HINT",
"hint_text": "d+e=f",
"referenced_activity": "main1234567"
},
{
"activity_id": "www789",
"activity_type": "MATH_PLOT_HINT",
"hint_url": "https://plot.com/image123.png",
"referenced_activity": "main1234567"
}
]
}
}
Note that the last_activity_id
maps to the top level activity. This indicates that we are starting this activity for the first time. Also note that there is no student_response
that we will see later.
Initial Math API response
{
"score": "START_QUESTION",
"activity": {
"activity_id": "main1234567",
"activity_type": "MATH_SINGLE_NUMERIC_ANSWER",
"question": "LIMIT[x^2 - 1/x - 1, X->0]",
"answers": ["-1"]
},
"feadback": "Try to answer this math problem.",
"is_done": false
}
Scoring Math API request (Fiirst score)
{
"last_activity_id": "main1234567",
"student_response": "17",
"activity": {
"activity_id": "main1234567",
"activity_type": "MATH_SINGLE_NUMERIC_ANSWER",
"question": "LIMIT[x^2 - 1/x - 1, X->0]",
"answers": ["-1"],
"sub_activities": [{
"activity_id": "abc123",
"activity_type": "MATH_STEP_HINT",
"hint_text": "a+b=c",
"referenced_activity": "main1234567"
},
{
"activity_id": "xyz456",
"activity_type": "MATH_STEP_HINT",
"hint_text": "d+e=f",
"referenced_activity": "main1234567"
},
{
"activity_id": "www789",
"activity_type": "MATH_PLOT_HINT",
"hint_url": "https://plot.com/image123.png",
"referenced_activity": "main1234567"
}
]
}
}
Note this is similar to the initial request except it has a student_response
that will be scored.
Scoring Math API responses
{
"score": "INCORRECT",
"activity": {
"activity_id": "abc123",
"activity_type": "MATH_STEP_HINT",
"hint_text": "a+b=c",
"referenced_activity": "main1234567"
},
"feadback": "That's not right. Take a look at the step in solving the problem and try and answer again.",
"is_done": false
}
Incorrect student response. Show the next hint activity.
{
"score": "INCORRECT",
"activity": {
"activity_id": "main1234567",
"activity_type": "MATH_SINGLE_NUMERIC_ANSWER",
"question": "LIMIT[x^2 - 1/x - 1, X->0]",
"answers": ["-1"]
},
"feadback": "That's not right. Here is the answer.",
"is_done": true
}
Incorrect student response. No more hints available (is_done=true) so display the answer.
{
"score": "CORRECT",
"feadback": "That's right! Good job.",
"is_done": true
}
Correct student response.
Tentative time for deployment to Production: Monday February 11, 2019 9 AM EST
Note: It's the Toucan release, but the branch is release/Taurus-1.4.x
. This is mostly because we (Srijith) didn't remember the name of the release when we created the release branch. By that time there were significant number of changes.
Bruce Srijith Saubhik Vivek (and anyone else he wants to include) Moumita Lisa
prod-deployment.yaml
file from cardinal-kubernetes
repo on the release/Taurus-1.4.x
branch must match those in staging-deployment.yaml
.release/Taurus-1.4.x branch
. Code built for Toucan will use tag names with the format 1.4.x
. Example: registry.ng.bluemix.net/cardinal/next-best-action:1.4.0
Replicate the Cloudant database.
Replicate the Redis keys to the new US East Redis server: https://github.com/compose-ex/python-redis-migrator
# python3 migrate-redis.py srchost srcpassword srcport desthost destpassword destport --ssldst
Set us-east region
# bx cs region-set us-east
From command line, set space
target to production-app
# bx target -s production-app
From command line, set cluster environment to cardinal-prod-us-east
.
# bx cs cluster-config cardinal-prod-us-east
Verify cluster config context was properly set to cardinal-prod-us-east
.
# kubectl config current-context
Apply prod-secrets.yaml
file from cardinal-kubernetes
repo on the release/Taurus-1.4.x
branch.
# kubectl apply -f prod-secrets.yaml
Apply prod-deployment.yaml
file from cardinal-kubernetes
repo on the release/Taurus-1.4.x
branch.
# kubectl apply -f prod-deployment.yaml
Log into IBM Cloud and reduce the number of worker nodes per region from 3 to 2. Unlike in Staging we will stay in all regions. This will allow us to not have to update the ALB.
Run jMeter tests to ensure basic functionality. Tests should be run against cluster API (cardinal-prod-us-east.us-east.containers.appdomain.cloud
), and CloudFlare (pearson.watson-tutor.ibm.com
).
Vivek's team will train DB and Watson Assistant for all titles.
Bruce/Srijith will restart SRA to ensure it has latest data loaded.
# kubectl patch deployment sra-deployment -p "{\"spec\":{\"template\":{\"metadata\":{\"annotations\":{\"RESTART_DATE\":\"`date +'%s'`\"}}}}}"
Bruce/Srijith to perform basic jMeter test, on one title, to ensure no errors are returned.
Saubhik/Others to run automated tests on all titles.
Lisa to run basic performance test
Close the Taurus-1.4.x release for the following repos. This list is complete at the time of this writing. Do this after successful deploy and wait a day, if you can, to make sure we don't need to rollback.
# git flow release finish Taurus-1.4.x
# git push origin master
# git push origin develop
# git push origin --tags
If you get merge conflicts against develop branch, create a PR to merge Taurus-1.4.x into develop. Have the dev resolve the merge conflicts and then merge in PR. Pull the latest code to your local machine and then you should be able to successfully do the git flow release finish Musca-1.4.x.
@snprabhu and I have been thinking about the best way to implement the run time portion of this.
There are basically 2 options:
scoring only
. Math problems still fall into the flow of Q&A with hints. This option would modify existing services to implement any changes needed for math flow and would only require the Math API to score the answer.We are still evaluating the best option but welcome feedback.