Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-ora2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-ora2
Commits
f2378a8e
Commit
f2378a8e
authored
Jun 12, 2014
by
Will Daly
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add data dog timing to AI worker API functions
parent
c4e68892
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
openassessment/assessment/api/ai_worker.py
+6
-2
No files found.
openassessment/assessment/api/ai_worker.py
View file @
f2378a8e
...
...
@@ -2,10 +2,10 @@
Public interface for AI training and grading, used by workers.
"""
import
logging
from
django.utils.timezone
import
now
from
django.db
import
DatabaseError
from
dogapi
import
dog_stats_api
from
openassessment.assessment.models
import
(
AITrainingWorkflow
,
AIGradingWorkflow
,
AIClassifierSet
,
AITrainingWorkflow
,
AIGradingWorkflow
,
ClassifierUploadError
,
ClassifierSerializeError
,
IncompleteClassifierSet
,
NoTrainingExamples
)
...
...
@@ -18,6 +18,7 @@ from openassessment.assessment.errors import (
logger
=
logging
.
getLogger
(
__name__
)
@dog_stats_api.timed
(
'openassessment.assessment.ai.get_grading_task_params'
)
def
get_grading_task_params
(
grading_workflow_uuid
):
"""
Retrieve the classifier set and algorithm ID
...
...
@@ -82,6 +83,7 @@ def get_grading_task_params(grading_workflow_uuid):
raise
AIGradingInternalError
(
msg
)
@dog_stats_api.timed
(
'openassessment.assessment.ai.create_assessment'
)
def
create_assessment
(
grading_workflow_uuid
,
criterion_scores
):
"""
Create an AI assessment (complete the AI grading task).
...
...
@@ -144,6 +146,7 @@ def create_assessment(grading_workflow_uuid, criterion_scores):
assessment_complete_signal
.
send
(
sender
=
None
,
submission_uuid
=
workflow
.
submission_uuid
)
@dog_stats_api.timed
(
'openassessment.assessment.ai.get_training_task_params'
)
def
get_training_task_params
(
training_workflow_uuid
):
"""
Retrieve the training examples and algorithm ID
...
...
@@ -227,6 +230,7 @@ def get_training_task_params(training_workflow_uuid):
raise
AITrainingInternalError
(
msg
)
@dog_stats_api.timed
(
'openassessment.assessment.ai.create_classifiers'
)
def
create_classifiers
(
training_workflow_uuid
,
classifier_set
):
"""
Upload trained classifiers and mark the workflow complete.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment