dhuser commited on
Commit
74f75da
·
1 Parent(s): 1af8cff

Update empty tag

Browse files
__pycache__/app.cpython-310.pyc ADDED
Binary file (19.6 kB). View file
 
__pycache__/io_utils.cpython-310.pyc ADDED
Binary file (8.22 kB). View file
 
__pycache__/moe.cpython-310.pyc ADDED
Binary file (7.15 kB). View file
 
__pycache__/paths.cpython-310.pyc ADDED
Binary file (1.84 kB). View file
 
__pycache__/paths.cpython-312.pyc ADDED
Binary file (1.85 kB). View file
 
__pycache__/prompts.cpython-310.pyc ADDED
Binary file (6.03 kB). View file
 
__pycache__/provider.cpython-310.pyc ADDED
Binary file (5.83 kB). View file
 
__pycache__/schemas.cpython-310.pyc ADDED
Binary file (9.2 kB). View file
 
__pycache__/schemas.cpython-312.pyc ADDED
Binary file (12.6 kB). View file
 
__pycache__/tutorial.cpython-310.pyc ADDED
Binary file (3.9 kB). View file
 
moe.py CHANGED
@@ -146,7 +146,11 @@ def _aggregate_field(
146
  winner, ratio = _priority(values_by_model, priority)
147
  else: # vote
148
  winner, ratio = _vote(values_by_model, priority)
149
- if ratio < 1.0 and len(values_by_model) > 1:
 
 
 
 
150
  disagreements.append(
151
  DisagreementCell(
152
  token_idx=token_idx,
 
146
  winner, ratio = _priority(values_by_model, priority)
147
  else: # vote
148
  winner, ratio = _vote(values_by_model, priority)
149
+ # Only flag *task-meaningful* disagreements. `min` aggregator (confidence) and
150
+ # `priority` aggregator (comment / free-text metadata) always differ across
151
+ # models — they would drown the user in noise.
152
+ quiet_aggregators = {"min", "priority"}
153
+ if ratio < 1.0 and len(values_by_model) > 1 and aggregator not in quiet_aggregators:
154
  disagreements.append(
155
  DisagreementCell(
156
  token_idx=token_idx,
static/app.js CHANGED
@@ -61,6 +61,7 @@ function annotator() {
61
  customTaskName: 'My custom task',
62
  customTagInput: '',
63
  customTags: [],
 
64
  includeConfidence: true,
65
  includeComment: false,
66
  },
@@ -422,10 +423,14 @@ function annotator() {
422
 
423
  buildCustomSchema() {
424
  const fields = [];
 
 
 
 
425
  fields.push({
426
  name: 'tag',
427
  type: 'enum',
428
- values: this.pasteEditor.customTags.slice(),
429
  nullable: false,
430
  aggregator: 'vote',
431
  subfields: [],
 
61
  customTaskName: 'My custom task',
62
  customTagInput: '',
63
  customTags: [],
64
+ includeNone: true,
65
  includeConfidence: true,
66
  includeComment: false,
67
  },
 
423
 
424
  buildCustomSchema() {
425
  const fields = [];
426
+ const baseTags = this.pasteEditor.customTags.slice();
427
+ const values = this.pasteEditor.includeNone
428
+ ? (baseTags.includes('O') ? baseTags : ['O', ...baseTags])
429
+ : baseTags;
430
  fields.push({
431
  name: 'tag',
432
  type: 'enum',
433
+ values,
434
  nullable: false,
435
  aggregator: 'vote',
436
  subfields: [],
static/index.html CHANGED
@@ -586,6 +586,12 @@
586
  :disabled="!(pasteEditor.customTagInput || '').trim()">+ Add</button>
587
  </div>
588
  <p class="text-[11px] text-ink-500 mt-1">Press <kbd>Enter</kbd>, <kbd>,</kbd> or <kbd>;</kbd> to add. You can also paste <code>PER, LOC, ORG, WORK</code> and press Enter to add them all at once.</p>
 
 
 
 
 
 
589
  </div>
590
  <div>
591
  <label class="lbl">Self-reported metadata, per token</label>
 
586
  :disabled="!(pasteEditor.customTagInput || '').trim()">+ Add</button>
587
  </div>
588
  <p class="text-[11px] text-ink-500 mt-1">Press <kbd>Enter</kbd>, <kbd>,</kbd> or <kbd>;</kbd> to add. You can also paste <code>PER, LOC, ORG, WORK</code> and press Enter to add them all at once.</p>
589
+ <label class="flex items-center gap-2 mt-3 text-sm cursor-pointer">
590
+ <input type="checkbox" x-model="pasteEditor.includeNone">
591
+ <span>Add an <strong>"O"</strong> tag for tokens that match <em>none</em> of your labels
592
+ <span class="text-ink-500">(recommended — without it, the LLM is forced to pick a label for every token)</span>
593
+ </span>
594
+ </label>
595
  </div>
596
  <div>
597
  <label class="lbl">Self-reported metadata, per token</label>