Watcher default settings must be defined in django settings.

This commit is contained in:
Mikaël Ates 2015-11-09 17:43:45 +01:00
parent 2b93e04ccd
commit 848aa480e5
1 changed files with 4 additions and 2 deletions

View File

@ -36,8 +36,10 @@ from .. import models as biomon_models
class Watcher:
def __init__(self, acceptance_rate=0.9, default_episode_duration=24,
reception_period=8, data_needed_rate=0.5):
def __init__(self, acceptance_rate=settings.ACCEPTANCE_RATE,
default_episode_duration=settings.DEFAULT_EPISODE_DURATION,
reception_period=settings.RECEPTION_PERIOD,
data_needed_rate=settings.DATA_NEEDED_RATE):
# Acceptance rate is the rate of data samples over the threshold on
# the minimal episode duration expected.
self.acceptance_rate = acceptance_rate