Skip to content

Commit 711b8ae

Browse files
committed
Add comment
1 parent 6ee77b2 commit 711b8ae

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

label_studio/data_manager/actions/experimental.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,18 +240,19 @@ def add_expression(queryset, size, value, value_name):
240240

241241
tasks = list(queryset.only('data'))
242242

243-
# sampling
243+
# permutation sampling
244244
if command == 'sample':
245245
values = random.sample(range(0, size), size)
246246
for i, v in enumerate(values):
247247
tasks[i].data[value_name] = v
248248

249-
# random
249+
# uniform random
250250
elif command == 'random':
251251
minimum, maximum = int(args[0]), int(args[1])
252252
for i in range(size):
253253
tasks[i].data[value_name] = random.randint(minimum, maximum)
254254

255+
# sampling with choices and weights
255256
elif command == 'choices':
256257
values = random.choices(
257258
population=json.loads(args[0]),

0 commit comments

Comments
 (0)