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
3d4fa8fc
Commit
3d4fa8fc
authored
Jun 23, 2014
by
Will Daly
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Provide default settings for dependency injection
parent
e237df58
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
22 deletions
+7
-22
openassessment/assessment/worker/algorithm.py
+7
-1
settings/base.py
+0
-15
settings/dev.py
+0
-6
No files found.
openassessment/assessment/worker/algorithm.py
View file @
3d4fa8fc
...
...
@@ -14,6 +14,12 @@ import base64
from
django.conf
import
settings
DEFAULT_AI_ALGORITHMS
=
{
'fake'
:
'openassessment.assessment.worker.algorithm.FakeAIAlgorithm'
,
'ease'
:
'openassessment.assessment.worker.algorithm.EaseAIAlgorithm'
}
class
AIAlgorithmError
(
Exception
):
"""
An error occurred when using an AI algorithm.
...
...
@@ -128,7 +134,7 @@ class AIAlgorithm(object):
UnknownAlgorithm
"""
algorithms
=
getattr
(
settings
,
"ORA2_AI_ALGORITHMS"
,
dict
()
)
algorithms
=
getattr
(
settings
,
"ORA2_AI_ALGORITHMS"
,
DEFAULT_AI_ALGORITHMS
)
cls_path
=
algorithms
.
get
(
algorithm_id
)
if
cls_path
is
None
:
...
...
settings/base.py
View file @
3d4fa8fc
...
...
@@ -149,21 +149,6 @@ CACHES = {
BASE_DIR
=
os
.
path
.
abspath
(
os
.
path
.
dirname
(
os
.
path
.
dirname
(
__file__
)))
# Configuration for the workflow API
# We use dependency injection to tell the workflow API
# which assessments to use and where to find the corresponding
# assessment API Python modules.
ORA2_ASSESSMENTS
=
{
'peer'
:
'openassessment.assessment.api.peer'
,
'self'
:
'openassessment.assessment.api.self'
,
'training'
:
'openassessment.assessment.api.student_training'
,
'ai'
:
'openassessment.assessment.api.ai'
,
}
# If peer-assessment provides a score, use that;
# otherwise fall back to self-assessment.
ORA2_ASSESSMENT_SCORE_PRIORITY
=
[
'peer'
,
'self'
,
'ai'
]
# Celery configuration
# Note: Version 3.1 of Celery includes Django support, but since we're using
# version 3.0 (same as edx-platform), we need to use an external library.
...
...
settings/dev.py
View file @
3d4fa8fc
...
...
@@ -101,12 +101,6 @@ LOGGING = {
# Store uploaded files in a dev-specific directory
MEDIA_ROOT
=
os
.
path
.
join
(
BASE_DIR
,
'storage/dev'
)
# AI algorithm configuration
ORA2_AI_ALGORITHMS
=
{
'fake'
:
'openassessment.assessment.worker.algorithm.FakeAIAlgorithm'
,
'ease'
:
'openassessment.assessment.worker.algorithm.EaseAIAlgorithm'
}
# Celery Broker
CELERY_BROKER_TRANSPORT
=
"amqp"
CELERY_BROKER_HOSTNAME
=
"localhost:5672//"
...
...
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