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
278daaa8
Commit
278daaa8
authored
Jun 11, 2014
by
Will Daly
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add datadog timing metrics to AI worker tasks
parent
5a37fa2e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletions
+4
-1
openassessment/assessment/worker/grading.py
+2
-0
openassessment/assessment/worker/training.py
+2
-1
No files found.
openassessment/assessment/worker/grading.py
View file @
278daaa8
...
...
@@ -25,6 +25,7 @@ RESCHEDULE_TASK_QUEUE = getattr(settings, 'LOW_PRIORITY_QUEUE', None)
@task
(
max_retries
=
MAX_RETRIES
)
# pylint: disable=E1102
@dog_stats_api.timed
(
'openassessment.assessment.ai.grade_essay.time'
)
def
grade_essay
(
workflow_uuid
):
"""
Asynchronous task to grade an essay using a text classifier
...
...
@@ -100,6 +101,7 @@ def grade_essay(workflow_uuid):
@task
(
queue
=
RESCHEDULE_TASK_QUEUE
,
max_retries
=
MAX_RETRIES
)
# pylint: disable=E1102
@dog_stats_api.timed
(
'openassessment.assessment.ai.reschedule_grading_tasks.time'
)
def
reschedule_grading_tasks
(
course_id
,
item_id
):
"""
Reschedules all incomplete grading workflows with the specified parameters.
...
...
openassessment/assessment/worker/training.py
View file @
278daaa8
...
...
@@ -5,7 +5,6 @@ import datetime
from
collections
import
defaultdict
from
celery
import
task
from
celery.utils.log
import
get_task_logger
from
celery.exceptions
import
InvalidTaskError
,
NotConfigured
,
NotRegistered
,
QueueNotFound
from
dogapi
import
dog_stats_api
from
django.conf
import
settings
from
django.db
import
DatabaseError
...
...
@@ -39,6 +38,7 @@ class InvalidExample(Exception):
@task
(
queue
=
TRAINING_TASK_QUEUE
,
max_retries
=
MAX_RETRIES
)
# pylint: disable=E1102
@dog_stats_api.timed
(
'openassessment.assessment.ai.train_classifiers.time'
)
def
train_classifiers
(
workflow_uuid
):
"""
Asynchronous task to train classifiers for AI grading.
...
...
@@ -150,6 +150,7 @@ def train_classifiers(workflow_uuid):
@task
(
queue
=
RESCHEDULE_TASK_QUEUE
,
max_retries
=
MAX_RETRIES
)
#pylint: disable=E1102
@dog_stats_api.timed
(
'openassessment.assessment.ai.reschedule_training_tasks.time'
)
def
reschedule_training_tasks
(
course_id
,
item_id
):
"""
Reschedules all incomplete training tasks
...
...
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