| array_tsv_escape |
Ran ran on a synthesized input |
leewaymay/839_fonduer/fonduer/async_annotations.py code served (permissive licence) · get_code("f881059738a828f8") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import numpy as np
# Analyze the function: array_tsv_escape takes 'vals' parameter
# It iterates through vals and calls tsv_escape on each element
# tsv_escape converts to string, handles None, replaces quotes and tabs, adds quotes if needed
# vals should be an iterable of values that can be converted to strings
# Create a variety of test values to demonstrate the function works
vals = [
"simple_string",
None,
42,
"string\twith\ttabs",
'string"with"quotes',
"string,with,commas",
"{nested}",
3.14159,
]
ARGS = {
"vals": vals
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| bbox_horz_aligned |
Ran ran on a synthesized input |
leewaymay/839_fonduer/fonduer/utils_visual.py code served (permissive licence) · get_code("0b661e76f71af707") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
class Box:
def __init__(self, top, bottom):
self.top = top
self.bottom = bottom
# Create two boxes that are horizontally aligned (vertically overlapping)
box1 = Box(top=10.0, bottom=20.0)
box2 = Box(top=15.0, bottom=25.0)
ARGS = {
"box1": box1,
"box2": box2,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type bool, ndim 0, dtype family float, shape () — shape () as a later run recorded it
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| confusion_matrix |
Ran ran on a synthesized input |
HazyResearch/fonduer/src/fonduer/learning/utils.py code served (permissive licence) · get_code("2fdee79f52206d57") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
from typing import Dict, List, Set, Tuple, Union
torch.manual_seed(0)
# The function takes two parameters: pred and gold, both should be sets
# The function converts them to sets if they aren't already, then computes
# intersection and differences. No complex operations needed.
# Create simple test sets of entities/candidates
pred_set = {"entity_1", "entity_2", "entity_3"}
gold_set = {"entity_2", "entity_3", "entity_4"}
ARGS = {
"pred": pred_set,
"gold": gold_set,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| dict2obj |
Ran ran on a synthesized input |
leewaymay/839_fonduer/fonduer/config.py code served (permissive licence) · get_code("433f9ea7c4a1523b") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned type. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
torch.manual_seed(0)
# dict2obj takes a single parameter 'd' which can be a dict or other type
# The function recursively converts dicts to objects, handling nested dicts and lists/tuples
# Create a test dictionary with various nested structures
test_dict = {
'name': 'test_object',
'value': 42,
'nested': {
'inner_key': 'inner_value',
'inner_number': 3.14
},
'items': [
{'item1': 'value1'},
{'item2': 'value2'}
],
'tuple_items': (
{'tuple_item1': 'tvalue1'},
{'tuple_item2': 'tvalue2'}
),
'simple_list': [1, 2, 3],
'tensor': torch.randn(2, 4)
}
ARGS = {
'd': test_dict
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type type — a type output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a type output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| get_box |
Ran ran on a synthesized input |
leewaymay/839_fonduer/fonduer/visualizer.py code served (permissive licence) · get_code("39e18ea238a07103") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 1, dtype family int; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
class MockSpan:
def __init__(self):
self.attribs = {
'page': [1, 2, 1],
'top': [10, 20, 15],
'left': [5, 8, 6],
'bottom': [100, 120, 110],
'right': [200, 250, 220]
}
def get_attrib_tokens(self, attrib_name):
return self.attribs.get(attrib_name, [])
span = MockSpan()
ARGS = {
'span': span
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type tuple, ndim 1, dtype family int — a tuple output has no array shape of its own; none is stated
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| get_img_box |
Ran ran on a synthesized input |
leewaymay/839_fonduer/fonduer/visualizer.py code served (permissive licence) · get_code("63240bdf674fa38c") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
class MockFigure:
def __init__(self):
self.page = 1
self.top = 10.5
self.left = 20.3
self.bottom = 100.7
self.right = 150.2
fig = MockFigure()
ARGS = {
'fig': fig
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| get_matches |
Ran ran on a synthesized input |
leewaymay/839_fonduer/fonduer/lf_helpers.py code served (permissive licence) · get_code("a466f6411554e195") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import torch.nn as nn
torch.manual_seed(0)
# A simple candidate class to represent what the function expects
class Candidate:
def __init__(self, text, label=None):
self.text = text
self.label = label
def __repr__(self):
return f"Candidate({self.text})"
# Define a simple labeling function (LF)
def simple_lf(candidate):
"""
A labeling function that returns 1, -1, or 0 based on candidate properties.
"""
if "good" in candidate.text.lower():
return 1
elif "bad" in candidate.text.lower():
return -1
else:
return 0
# Create a candidate set
candidate_set = [
Candidate("This is good"),
Candidate("This is bad"),
Candidate("This is neutral"),
Candidate("Another good one"),
Candidate("Another bad one"),
]
# Define match_values
match_values = [1, -1]
# Construct ARGS
ARGS = {
"lf": simple_lf,
"candidate_set": candidate_set,
"match_values": match_values,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| get_sql_name |
Ran ran on a synthesized input |
leewaymay/839_fonduer/fonduer/async_annotations.py code served (permissive licence) · get_code("1fb4b0ddad9f9fc3") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
def get_sql_name(text):
"""
Create valid SQL identifier as part of a feature storage table name
"""
text = ''.join((c.lower() if c.isalnum() else ' ' for c in text))
text = '_'.join(text.split())
return text
ARGS = {
'text': 'Feature_Name_123!@#'
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| mark |
Ran ran on a synthesized input |
HazyResearch/fonduer/src/fonduer/learning/utils.py code served (permissive licence) · get_code("5b118452912eb38d") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 2, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import numpy as np
# Simple test arguments for the mark function
# The function takes three integers and returns a list of tuples
ARGS = {
'l': 0,
'h': 5,
'idx': 1
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type list, ndim 2, dtype family float — a list output has no array shape of its own; none is stated
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| min_axis_diff |
Ran ran on a synthesized input |
leewaymay/839_fonduer/fonduer/utils_table.py code served (permissive licence) · get_code("017eb2dd1f03d58e") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned int, ndim 0, dtype family int, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import numpy as np
# Define a stand-in class to represent objects with row and column ranges
class RangeObject:
def __init__(self, row_start, row_end, col_start, col_end):
self.row_start = row_start
self.row_end = row_end
self.col_start = col_start
self.col_end = col_end
# Create two RangeObject instances with different ranges
a = RangeObject(row_start=0, row_end=5, col_start=10, col_end=15)
b = RangeObject(row_start=3, row_end=8, col_start=12, col_end=18)
# Define ARGS dict with all parameters for min_axis_diff
ARGS = {
'a': a,
'b': b,
'axis': 'row',
'absolute': True
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type int, ndim 0, dtype family int, shape () — shape () as a later run recorded it
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| min_col_diff |
Ran ran on a synthesized input |
leewaymay/839_fonduer/fonduer/utils_table.py code served (permissive licence) · get_code("eb94dd737e9d61ec") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned int, ndim 0, dtype family int, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import itertools
class MockObject:
def __init__(self, col_start, col_end):
self.col_start = col_start
self.col_end = col_end
# Create two mock objects with col_start and col_end attributes
a = MockObject(col_start=5, col_end=10)
b = MockObject(col_start=8, col_end=15)
ARGS = {
"a": a,
"b": b,
"absolute": True
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type int, ndim 0, dtype family int, shape () — shape () as a later run recorded it
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| min_row_diff |
Ran ran on a synthesized input |
leewaymay/839_fonduer/fonduer/utils_table.py code served (permissive licence) · get_code("3e395686ed941775") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned int, ndim 0, dtype family int, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import numpy as np
class MockRange:
"""Mock object with row_start and row_end attributes."""
def __init__(self, row_start, row_end):
self.row_start = row_start
self.row_end = row_end
# Create two mock range objects with different row ranges
a = MockRange(row_start=1, row_end=5)
b = MockRange(row_start=3, row_end=7)
ARGS = {
"a": a,
"b": b,
"absolute": True
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type int, ndim 0, dtype family int, shape () — shape () as a later run recorded it
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| output |
Ran ran on a synthesized input |
HazyResearch/fonduer/src/fonduer/learning/task.py code served (permissive licence) · get_code("2652153f0068db59") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family float, shape (2, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import torch.nn as nn
import torch.nn.functional as F
torch.manual_seed(0)
# The function accesses intermediate_output_dict[module_name][0]
# and applies F.softmax to it, so we need:
# 1. A module_name string
# 2. An intermediate_output_dict with that key mapping to a sequence/tensor
# where the first element is a tensor suitable for softmax
module_name = "logits"
# Create a small tensor to use as input to softmax
# Shape: (2, 4) - batch size 2, 4 classes
logits_tensor = torch.randn(2, 4)
# intermediate_output_dict needs to have module_name as a key
# The value should be indexable with [0], so we wrap the tensor in a list
intermediate_output_dict = {
module_name: [logits_tensor]
}
ARGS = {
"module_name": module_name,
"intermediate_output_dict": intermediate_output_dict
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) as a later run recorded it
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| same_document |
Ran ran on a synthesized input |
leewaymay/839_fonduer/fonduer/lf_helpers.py code served (permissive licence) · get_code("76908afae2568a3d") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
class Document:
def __init__(self, doc_id):
self.doc_id = doc_id
class Sentence:
def __init__(self, document):
self.document = document
class Span:
def __init__(self, sentence):
self.sentence = sentence
# Create test documents
doc1 = Document("doc1")
doc2 = Document("doc2")
# Create sentences from the same document
sentence1_doc1 = Sentence(doc1)
sentence2_doc1 = Sentence(doc1)
# Create sentences from different documents
sentence1_doc2 = Sentence(doc2)
# Create spans
span1 = Span(sentence1_doc1)
span2 = Span(sentence2_doc1)
span3 = Span(sentence1_doc2)
# Test case 1: all spans from same document
candidate_same_doc = [span1, span2]
# Test case 2: spans from different documents
candidate_diff_doc = [span1, span3]
# Test case 3: single span
candidate_single = [span1]
# Test case 4: span with None document
span_none = Span(Sentence(None))
candidate_with_none = [span_none]
ARGS = {
"c": candidate_same_doc
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type bool, ndim 0, dtype family float, shape () — shape () as a later run recorded it
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| same_table |
Ran ran on a synthesized input |
leewaymay/839_fonduer/fonduer/lf_helpers.py code served (permissive licence) · get_code("1d3b809ab5c89904") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
class Span:
def __init__(self, sentence):
self.sentence = sentence
class Sentence:
def __init__(self, is_tabular_val, table_val):
self._is_tabular = is_tabular_val
self.table = table_val
def is_tabular(self):
return self._is_tabular
# Case 1: All spans from the same table
sentence_1 = Sentence(is_tabular_val=True, table_val="table_A")
span_1 = Span(sentence=sentence_1)
span_2 = Span(sentence=sentence_1)
span_3 = Span(sentence=sentence_1)
candidate = [span_1, span_2, span_3]
ARGS = {
"c": candidate
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type bool, ndim 0, dtype family float, shape () — shape () as a later run recorded it
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| tsv_escape |
Ran ran on a synthesized input |
leewaymay/839_fonduer/fonduer/async_annotations.py code served (permissive licence) · get_code("7fa48455ddfceaf9") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import numpy as np
def tsv_escape(s):
if s is None:
return '\\N'
s = str(s)
s = s.replace('"', '\\\\"').replace('\t', '\\t')
if any((c in ',{}' for c in s)):
s = '"' + s + '"'
return s
# Test with various input types
ARGS = {
's': 'hello\tworld,test'
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|