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
d9b6bce1
Commit
d9b6bce1
authored
Jun 25, 2014
by
Will Daly
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #457 from edx/will/TIM-661
Catch HTTP errors that occur when downloading classifier data
parents
75c5f7ed
aee87a7e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
1 deletions
+11
-1
openassessment/assessment/api/ai_worker.py
+5
-1
openassessment/assessment/models/ai.py
+6
-0
No files found.
openassessment/assessment/api/ai_worker.py
View file @
d9b6bce1
...
...
@@ -2,6 +2,7 @@
Public interface for AI training and grading, used by workers.
"""
import
logging
from
httplib
import
HTTPException
from
django.db
import
DatabaseError
from
dogapi
import
dog_stats_api
from
openassessment.assessment.models
import
(
...
...
@@ -80,7 +81,10 @@ def get_grading_task_params(grading_workflow_uuid):
for
classifier
in
classifiers
}
}
except
(
DatabaseError
,
ClassifierSerializeError
,
IncompleteClassifierSet
,
ValueError
)
as
ex
:
except
(
DatabaseError
,
ClassifierSerializeError
,
IncompleteClassifierSet
,
ValueError
,
IOError
,
HTTPException
)
as
ex
:
msg
=
(
u"An unexpected error occurred while retrieving "
u"classifiers for the grading workflow with UUID {uuid}: {ex}"
...
...
openassessment/assessment/models/ai.py
View file @
d9b6bce1
...
...
@@ -276,6 +276,11 @@ class AIClassifierSet(models.Model):
dict: keys are criteria names, values are JSON-serializable classifier data
If there are no classifiers in the set, returns None
Raises:
ValueError
IOError
httplib.HTTPException
"""
# First check the in-memory cache
# We use an in-memory cache because the classifier data will most often
...
...
@@ -364,6 +369,7 @@ class AIClassifier(models.Model):
Raises:
ValueError
IOError
httplib.HTTPException
"""
return
json
.
loads
(
self
.
classifier_data
.
read
())
# pylint:disable=E1101
...
...
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