Skip to content

Commit 4880338

Browse files
fix small problems
1 parent 3658384 commit 4880338

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

api/activetigger/project.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -833,12 +833,17 @@ def get_next(
833833
indicator = None
834834
n_sample = f.sum() # use len(ss) for adding history
835835

836+
# validate selection method
837+
valid_selections = {"fixed", "random", "maxprob", "active"}
838+
if next.selection not in valid_selections:
839+
raise ValueError(f"Unknown selection method: '{next.selection}'")
840+
836841
# select an element based on the method
837842

838843
if next.selection == "fixed": # next row
839844
element_id = ss.index[0]
840845

841-
if next.selection == "random": # random row
846+
elif next.selection == "random": # random row
842847
element_id = ss.sample(n=1).index[0]
843848

844849
# be sure that the model has been trained

docker/.env

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,6 @@ DATA_URL=/data
5050
ROOT_PASSWORD=l3tm31n!
5151
ACTIVETIGGER_USER_HDD_MAX=30
5252
MAX_LOADED_PROJECTS=20
53-
N_WORKERS_GPU=1
54-
N_WORKERS_CPU=3
5553
UPDATE_TIMEOUT=1
5654
SECRET_KEY="Q__zz0ew00R_YSwCFl-6VgS9dPbfDtFDnzHfd57t0EY=" # FALSE KEY CHANGE IT 32 url-safe base64-encoded bytes
5755
JWT_ALGORITHM=HS256

0 commit comments

Comments
 (0)