| analyze_words |
Ran ran on a synthesized input |
raraz15/DeepTurkish/utilities/text_format.py code served (permissive licence) · get_code("10e460eab230057c") 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 Counter. 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.
from collections import Counter
# Analyze the function to understand what it needs:
# - sentences: an iterable of strings
# - Each sentence is processed: stripped of '.', split by ' ', and iterated over
# - Returns a Counter object
ARGS = {
'sentences': [
'The quick brown fox jumps over the lazy dog.',
'The dog is lazy and the fox is quick.',
'Dogs and foxes are animals.'
]
}
- 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 Counter — a Counter output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Counter 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
|
| bracket_filter |
Ran ran on a synthesized input |
fd873630/deep_speech_2_korean/pre_processing_for_AI_hub_data.py code served (permissive licence) · get_code("8c10b7268fa78056") 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.
# Setup code for bracket_filter function
ARGS = {
"sentence": "(철자전사) / (발음전사)"
}
- 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 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
|
| calculate_cer |
Ran ran on a synthesized input |
mangelroman/audio2score/utils.py code served (permissive licence) · get_code("32429a57833e5b21") 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.
import Levenshtein as Lev
def calculate_cer(s1, s2, word_sep=' '):
"""
Computes the Character Error Rate, defined as the edit distance.
Arguments:
s1 (string): space-separated sentence
s2 (string): space-separated sentence
"""
s1, s2 = (s1.replace(word_sep, '\n'), s2.replace(word_sep, '\n'))
s1, s2 = (''.join(s1.splitlines()), ''.join(s2.splitlines()))
return (Lev.distance(s1, s2), len(s1), len(s2))
ARGS = {
's1': 'hello world',
's2': 'hallo wold',
'word_sep': ' '
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- Levenshtein — 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
|
| calculate_wer |
Ran ran on a synthesized input |
mangelroman/audio2score/utils.py code served (permissive licence) · get_code("3a1a5ae272c7dfdb") 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.
import Levenshtein as Lev
def calculate_wer(s1, s2, word_sep=' '):
"""
Computes the Word Error Rate, defined as the edit distance between the
two provided sentences after tokenizing to words.
Arguments:
s1 (string): space-separated sentence
s2 (string): space-separated sentence
"""
s1words = []
for l in s1.splitlines():
s1words.extend(l.split(word_sep))
s2words = []
for l in s2.splitlines():
s2words.extend(l.split(word_sep))
b = set(s1words + s2words)
word2char = dict(zip(b, range(len(b))))
w1 = [chr(word2char[w]) for w in s1words]
w2 = [chr(word2char[w]) for w in s2words]
return (Lev.distance(''.join(w1), ''.join(w2)), len(s1words), len(s2words))
ARGS = {
"s1": "the quick brown fox jumps over the lazy dog",
"s2": "the quick brown dog jumps over a lazy cat",
"word_sep": " "
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- Levenshtein — 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
|
| check_envirionment |
Ran ran on a synthesized input |
switiz/deepspeech2.pytorch/utils.py code served (permissive licence) · get_code("5cb79c0f243a5040") 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 device. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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 logging
torch.manual_seed(0)
# Configure logging to see output
logging.basicConfig(level=logging.DEBUG, format='%(levelname)s: %(message)s')
# The function takes one parameter: use_cuda (boolean)
# It checks if CUDA is available and returns a device
# The function doesn't actually use the return value in a way that requires specific setup
# It just needs a boolean flag for use_cuda
ARGS = {
'use_cuda': False
}
- 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 device — a device output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a device 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
|
| check_loss |
Ran ran on a synthesized input |
SeanNaren/deepspeech.pytorch/deepspeech_pytorch/utils.py code served (permissive licence) · get_code("ca014346b646227a") 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
torch.manual_seed(0)
# Construct arguments for check_loss function
# The function takes:
# - loss: a tensor (checked with torch.isnan)
# - loss_value: a scalar numeric value (checked against inf and negative)
# Create a valid loss tensor
loss = torch.tensor([0.5], dtype=torch.float32)
# Create a valid loss value
loss_value = 0.5
ARGS = {
'loss': loss,
'loss_value': loss_value
}
- 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
|
| clean_text |
Ran ran on a synthesized input |
raraz15/DeepTurkish/utilities/text_format.py code served (permissive licence) · get_code("1486f8a5a335a589") 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 re
def clean_text(text):
text = re.sub('<.*?>', '', text)
text = re.sub('\\n.+?\\n\\n', '', text)
text = re.sub('\\s[.,:;]\\s', ' ', text)
text = re.sub('[\\n]+?', '', text)
text = re.sub('\\[\\[[^]]*\\]\\]', '', text)
text = re.sub('\\[[^]]*\\]', '', text)
text = re.sub('\\{\\{[^}]*\\}\\}', '', text)
text = re.sub('\\{[^}]*\\}', '', text)
text = re.sub('\\(\\([^)]*\\)\\)', '', text)
text = re.sub('\\([^)]*\\)', '', text)
text = re.sub('IV\\.|4\\.', 'dördüncü', text)
text = re.sub('V\\.|5\\.', 'beşinci', text)
text = re.sub('III\\.|3\\.', 'üçüncü', text)
text = re.sub('II\\.|2\\.', 'ikinci', text)
text = re.sub('I\\.|1\\.', 'birinci', text)
text = re.sub('²', 'kare', text)
text = re.sub('\\d\\.', '', text)
text = re.sub('\\d', '', text)
text = re.sub('\\s[^o]\\.', '', text)
text = text.lower()
text = re.sub('[^\\w\\s\\.\\?!%]', '', text)
text = re.sub('[\\?!]', '.', text)
text = re.sub('[%�]', 'yüzde ', text)
text = re.sub('[İî]', 'i', text)
text = re.sub('â', 'a', text)
text = re.sub('û', 'u', text)
text = re.sub('[\\x85\\xe9\\xa0]', '', text)
escape_sequence_re = re.compile('\\\\u[0-9a-fA-F]{2,4}')
text = re.sub(escape_sequence_re, '', text)
text = re.sub(' +', ' ', text)
return text
# Setup code
sample_text = """
<html>This is a sample text with HTML tags</html>
Some content with numbers 123 and special characters like â, û, İ.
It has punctuation . , : ; and also roman numerals I. II. III. IV. V.
Multiple spaces and newlines
[citation needed] {{template}} ((nested)) percent % sign
"""
ARGS = {
'text': sample_text
}
- 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 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
|
| create_train_val_partition |
Ran ran on a synthesized input |
raraz15/DeepTurkish/model/data_loader.py code served (permissive licence) · get_code("0a6358ab2d2cde39") 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 pandas as pd
# Create a small test dataframe with required columns
df = pd.DataFrame({
'path': ['audio_001', 'audio_002', 'audio_003', 'audio_004', 'audio_005', 'audio_006'],
'encoded': [
[1, 2, 3],
[4, 5, 6],
[7, 8, 9],
[10, 11, 12],
[13, 14, 15],
[16, 17, 18]
]
})
ARGS = {
'df': df,
'split_ratio': 0.7,
'N_batch': 2
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- pandas — 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
|
| emptyCache |
Ran ran on a synthesized input |
raraz15/DeepTurkish/decoders/Loss.py code served (permissive licence) · get_code("97dd44510f634ab4") 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
torch.manual_seed(0)
# Analyze the function:
# - maxT: an integer representing the maximum time dimension
# - labelingWithBlanks: a sequence/list that we iterate over with len()
# The function creates a 2D list of None values with dimensions [maxT][len(labelingWithBlanks)]
maxT = 5
labelingWithBlanks = [0, 1, 2] # A list with 3 elements representing labels/blanks
ARGS = {
"maxT": maxT,
"labelingWithBlanks": labelingWithBlanks,
}
- 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
|
| extendByBlanks |
Ran ran on a synthesized input |
raraz15/DeepTurkish/decoders/Common.py code served (permissive licence) · get_code("d5863fd24a880e87") 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 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.
import torch
torch.manual_seed(0)
# seq: a sequence of labels (could be a list of integers or strings)
# b: a blank label (could be an integer or string)
seq = [1, 2, 3]
b = 0
ARGS = {
"seq": seq,
"b": b
}
- 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 int — 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
|
| filenum_padding |
Ran ran on a synthesized input |
fd873630/deep_speech_2_korean/make_korea_json_label.py code served (permissive licence) · get_code("feb2e0517d7590e7") 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
# Based on the function, it takes a single parameter 'filenum' which should be an integer
# The function pads file numbers to 6 digits with leading zeros
ARGS = {
'filenum': 42
}
- 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
|
| filter_sentence_list |
Ran ran on a synthesized input |
raraz15/DeepTurkish/utilities/text_format.py code served (permissive licence) · get_code("36b307919659b64f") 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 numpy as np
torch.manual_seed(0)
ARGS = {
"sentence_list": [
"hello world",
"this is a longer sentence that passes the bound check",
" leading space sentence",
"no period",
"",
"a",
"short"
],
"clean_sentences": [],
"bound": 5
}
- 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 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
|
| filter_short_utterances |
Ran ran, violated the contract we drafted |
GavinGuan95/Punctuator.Pytorch/data/ted.py code served (permissive licence) · get_code("9e067daa4caf2798") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) 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.
import torch
import numpy as np
torch.manual_seed(0)
# The function expects an utterance_info dictionary with keys:
# 'start_time', 'end_time', 'transcript'
# and an optional min_len_sec parameter
utterance_info = {
'start_time': 0.0,
'end_time': 10.0,
'transcript': 'This is a sample transcript that is long enough to pass the length check.'
}
min_len_sec = 5.0
ARGS = {
'utterance_info': utterance_info,
'min_len_sec': min_len_sec
}
- Setup block drafted by
- a language model, Claude Sonnet 4.5, prompt python_fixture_v1
- Imports
- numpy, torch — 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
|
| get_lr |
Ran ran on a synthesized input |
freshtan/deepspeech2/src/lr_generator.py code served (permissive licence) · get_code("2adf2c08a0fbed04") 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 ndarray, ndim 1, dtype family float, shape (1000,) 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 numpy as np
# Construct arguments for get_lr function
ARGS = {
"lr_init": 0.1,
"total_epochs": 10,
"steps_per_epoch": 100
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type ndarray, ndim 1, dtype family float, shape (1000,) — shape (1000,) 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
|
| get_path |
Ran ran on a synthesized input |
fd873630/deep_speech_2_korean/pre_processing_for_AI_hub_data.py code served (permissive licence) · get_code("67b46d997a6d2d02") 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 get_path(path, fname, filenum, format):
"""
텍스트 파일의 경로를 잡아주는 함수를 미리 정의해둔다.
"""
return path + fname + filenum + format
ARGS = {
"path": "/home/user/documents/",
"fname": "data_",
"filenum": "001",
"format": ".txt"
}
- 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
|
| get_utterances_from_stm |
Ran ran; our contract draft was wrong, not the code |
GavinGuan95/Punctuator.Pytorch/data/ted.py code served (permissive licence) · get_code("82d083fca2fe6ff4") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) 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 tempfile
import os
# Create a temporary STM file with sample content
stm_content = """file1 1 speaker1 0.0 1.5 <o,f0,male> Hello world
file1 1 speaker1 1.5 3.2 <o,f0,male> This is a test
file2 1 speaker2 0.5 2.0 <o,f0,female> ignore_time_segment_in_scoring
file2 1 speaker2 2.0 4.5 <o,f0,female> Another utterance here
file3 1 speaker3 1.0 2.5 <o,f0,male> Final test phrase
"""
# Write to a temporary file
temp_stm = tempfile.NamedTemporaryFile(mode='w', encoding='utf-8', delete=False, suffix='.stm')
temp_stm.write(stm_content)
temp_stm.close()
ARGS = {
'stm_file': temp_stm.name
}
- Setup block drafted by
- a language model, Claude Sonnet 4.5, prompt python_fixture_v1
- 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 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
|
| is_valid_poly |
Ran ran on a synthesized input |
wangys102/MindSpore/east/detect.py code served (permissive licence) · get_code("22b8e8ecc724c6f4") 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.
import torch
import numpy as np
torch.manual_seed(0)
# res: a 2D array/tensor representing polygon coordinates
# Shape should be (2, num_points) where first row is x-coords, second row is y-coords
res = torch.tensor([
[10.5, 20.3, 15.2, 5.1], # x coordinates
[8.2, 12.5, 18.3, 3.1] # y coordinates
], dtype=torch.float32)
# score_shape: shape of the score map (height, width)
score_shape = (32, 48)
# scale: scaling factor from feature map to image coordinates
scale = 2
ARGS = {
"res": res,
"score_shape": score_shape,
"scale": scale
}
- 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 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
|
| load_dataset |
Ran ran on a synthesized input |
switiz/deepspeech2.pytorch/utils.py code served (permissive licence) · get_code("8210be28ca690ac0") 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 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 tempfile
import os
# Create a temporary file with tab-separated transcript data
temp_file = tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.txt')
temp_file.write("audio/file1.wav\t한글 텍스트 1\tEnglish transcript 1\n")
temp_file.write("audio/file2.wav\t한글 텍스트 2\tEnglish transcript 2\n")
temp_file.write("audio/file3.wav\t한글 텍스트 3\tEnglish transcript 3\n")
temp_file.close()
transcripts_path = temp_file.name
ARGS = {
"transcripts_path": transcripts_path
}
- 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 2, 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
|
| loadfromecsv |
Ran ran on a synthesized input |
bjtommychen/Keras_DeepSpeech2_SpeechRecognition/Keras_DS2_SpeechRecognition.py code served (permissive licence) · get_code("c9ba0819dfef9bee") 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 csv
import tempfile
import os
# Create a temporary CSV file with some test data
temp_dir = tempfile.mkdtemp()
csv_file = os.path.join(temp_dir, "test.csv")
with open(csv_file, 'w', newline='') as f:
writer = csv.writer(f)
writer.writerow(['col1', 'col2', 'col3'])
writer.writerow(['a', 'b', 'c'])
writer.writerow(['1', '2', '3'])
ARGS = {
'fname': csv_file
}
- 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 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
|
| multiply_probs |
Ran ran on a synthesized input |
raraz15/DeepTurkish/decoders/BeamSearch.py code served (permissive licence) · get_code("6d9a921d68e2df89") 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
torch.manual_seed(0)
# ln_pa and ln_pb are log probabilities (tensors)
# They should be added together, so they need compatible shapes
ln_pa = torch.randn(2, 4)
ln_pb = torch.randn(2, 4)
ARGS = {
"ln_pa": ln_pa,
"ln_pb": ln_pb,
}
- 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
|
| pad_collate_fn |
Ran ran on a synthesized input |
raraz15/DeepTurkish/model/data_loader.py code served (permissive licence) · get_code("e32b0e8512dc35f0") 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. 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 torch.nn as nn
torch.manual_seed(0)
# Create sample data items in the format expected by pad_collate_fn
# Each item is a tuple: (X, N_frames, y, S)
# X: tensor of shape (T, F) - features with T time steps and F features
# N_frames: int - number of frames
# y: tensor - target sequence
# S: int - target length
data_item_1 = (
torch.randn(5, 4), # X: (T=5, F=4) features
5, # N_frames: 5
torch.tensor([1, 2, 3]), # y: target sequence
3 # S: target length (length of y)
)
data_item_2 = (
torch.randn(7, 4), # X: (T=7, F=4) features
7, # N_frames: 7
torch.tensor([2, 1]), # y: target sequence
2 # S: target length
)
# Create the data list for collate function
data = [data_item_1, data_item_2]
ARGS = {
"data": data
}
- 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 — a tuple output has no array shape of its own; none is 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
|
| pad_list |
Ran ran on a synthesized input |
mangelroman/audio2score/utils.py code served (permissive licence) · get_code("ce10a394eb6dd5f4") 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 3, dtype family float, shape (2, 5, 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
torch.manual_seed(0)
# Create a list of tensors with different lengths
# The function expects xs to be a list of tensors
# It calls .size(0) to get the first dimension (sequence length)
# It uses .new() to create a new tensor with the same type
xs = [
torch.randn(3, 4), # First tensor: length 3, feature dim 4
torch.randn(5, 4), # Second tensor: length 5, feature dim 4
]
pad_value = 0.0
ARGS = {
"xs": xs,
"pad_value": pad_value,
}
- 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 3, dtype family float, shape (2, 5, 4) — shape (2, 5, 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
|
| parseIntList |
Ran ran on a synthesized input |
mangelroman/audio2score/prepare.py code served (permissive licence) · get_code("7ddd1a77d6823719") 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 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.
import torch
torch.manual_seed(0)
# parseIntList takes a single parameter: string
# The function checks if string is truthy and has length > 0
# Then it splits by ',' and converts each part to int
# So we need a valid comma-separated string of integers
ARGS = {
"string": "1,2,3,4,5"
}
- 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 int — 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
|
| parseList |
Ran ran on a synthesized input |
mangelroman/audio2score/prepare.py code served (permissive licence) · get_code("da8541fdf204f0e1") 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
def parseList(string):
if string and len(string) > 0:
return string.split(',')
return None
ARGS = {
'string': 'apple,banana,cherry'
}
- 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
|
| read_txt |
Ran ran on a synthesized input |
raraz15/DeepTurkish/decoders/LanguageModel.py code served (permissive licence) · get_code("be421821ea5166fc") 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 tempfile
import os
# Create a temporary file with some test content
with tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.txt', encoding='utf-8') as f:
f.write("line 1\n")
f.write("line 2\n")
f.write("line 3\n")
temp_file_path = f.name
try:
ARGS = {
'file_path': temp_file_path,
'encoding': 'utf-8'
}
finally:
# Clean up will happen after execution
pass
- 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 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
|
| recLabelingProb |
Ran ran on a synthesized input |
raraz15/DeepTurkish/decoders/Loss.py code served (permissive licence) · get_code("7859a5f3ad787675") 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 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.
import torch
import math
torch.manual_seed(0)
# The function accesses:
# - mat[t, labelingWithBlanks[s]] and mat[0, blank] => mat must be indexable 2D array
# - labelingWithBlanks[s], labelingWithBlanks[1], labelingWithBlanks[s-2] => list/array with indices
# - cache[t][s] for read/write => 2D nested list or array
# - blank as an integer index
# - t, s as loop variables (integers)
# Build mat as a log-probability matrix (time steps x num_classes)
# Use shape (5, 6) to have distinct dimensions
T = 5 # time steps
num_classes = 6
mat = torch.randn(T, num_classes) # log probabilities
# blank is an index into the classes
blank = 0
# labelingWithBlanks is a sequence with blanks interspersed
# Must have enough elements for indexing up to s in the recursion
# Typical CTC format: [blank, label, blank, label, ...]
labelingWithBlanks = [blank, 1, blank, 2, blank, 3]
# cache is a 2D structure to store results
# Needs cache[t][s] for t in range(T) and s in range(len(labelingWithBlanks))
cache = [[None for _ in range(len(labelingWithBlanks))] for _ in range(T)]
# Arguments for the function call
ARGS = {
"t": 2, # some time step
"s": 3, # some labeling index
"mat": mat,
"labelingWithBlanks": labelingWithBlanks,
"blank": blank,
"cache": cache,
}
- 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 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
|
| resize_img |
Ran ran; our contract draft was wrong, not the code |
wangys102/MindSpore/east/detect.py code served (permissive licence) · get_code("27298601d9541728") 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. 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.
from PIL import Image
import numpy as np
# Create a simple test image
# Using a non-divisible-by-32 size to test the resizing logic
width = 100
height = 75
img = Image.new('RGB', (width, height), color='red')
ARGS = {
'img': img
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- PIL, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type tuple — a tuple output has no array shape of its own; none is 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
|
| run_evaluation |
Ran ran on a synthesized input |
hkakitani/deepspeech.pytorch/deepspeech_pytorch/testing.py code served (permissive licence) · get_code("d954560f1b1b7360") 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. 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 torch.nn as nn
from torch.utils.data import DataLoader
torch.manual_seed(0)
# Minimal Model that satisfies how run_evaluation uses it
class DummyModel(nn.Module):
def __init__(self):
super().__init__()
self.linear = nn.Linear(4, 8)
def forward(self, inputs, input_sizes):
# inputs shape: (batch, channels, height, width)
# output should be (batch, output_seq_len, num_classes)
batch_size = inputs.size(0)
out = torch.randn(batch_size, 5, 10) # (batch=2, seq_len=5, num_classes=10)
output_sizes = torch.tensor([5, 5], dtype=torch.int32)
return out, output_sizes
# Minimal Decoder with required methods
class DummyDecoder:
def decode(self, outputs, output_sizes):
# outputs: (batch, seq_len, num_classes)
# Should return (decoded_output, confidence)
batch_size = outputs.size(0)
decoded = [[(f"hypothesis_{i}",)] for i in range(batch_size)]
return decoded, None
def wer(self, transcript, reference):
# Word Error Rate (return a number)
return 0
def cer(self, transcript, reference):
# Character Error Rate (return a number)
return 0
# Minimal Target Decoder
class DummyTargetDecoder:
def convert_to_strings(self, split_targets):
# split_targets is a list of tensors
# Should return list of lists of strings
result = []
for target in split_targets:
result.append((f"reference",))
return result
# Create test data loader
def create_test_batch():
# inputs: (batch, channels, height, width) - batch=2, channels=1, height=3, width=4
inputs = torch.randn(2, 1, 3, 4)
# targets: flattened tensor of target indices
targets = torch.tensor([1, 2, 3, 4, 5, 6], dtype=torch.long)
# input_percentages: (batch,) - fractions that will be multiplied by inputs.size(3)
input_percentages = torch.tensor([1.0, 1.0], dtype=torch.float)
# target_sizes: size of each target in the flattened targets tensor
target_sizes = torch.tensor([3, 3], dtype=torch.long)
return (inputs, targets, input_percentages, target_sizes)
test_loader = [create_test_batch(), create_test_batch()]
ARGS = {
"test_loader": test_loader,
"device": torch.device("cpu"),
"model": DummyModel(),
"decoder": DummyDecoder(),
"target_decoder": DummyTargetDecoder(),
"save_output": None,
"verbose": False,
"use_half": False,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch, tqdm — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type tuple — a tuple output has no array shape of its own; none is 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
|
| sparse_tensor_value_to_texts |
Ran ran; our contract draft was wrong, not the code |
bjtommychen/Keras_DeepSpeech2_SpeechRecognition/util/text.py code served (permissive licence) · get_code("7970c223f17766e6") 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 numpy as np
class MockAlphabet:
def string_from_label(self, label):
# Convert label to character
return chr(ord('a') + int(label) % 26)
class MockSparseTensor:
def __init__(self, indices, values, dense_shape):
self.indices = indices
self.values = values
self.dense_shape = dense_shape
torch.manual_seed(0)
# Create sparse tensor components
# indices: shape (num_nonzero, rank) - here (4, 1) for 1D
indices = torch.tensor([[0], [0], [1], [1]], dtype=torch.int64)
# values: shape (num_nonzero,) - labels into alphabet
values = torch.tensor([0, 1, 2, 3], dtype=torch.int64)
# dense_shape: shape (rank,) - here (2,) for batch size 2
dense_shape = torch.tensor([2], dtype=torch.int64)
# Create mock sparse tensor
value = MockSparseTensor(indices, values, dense_shape)
# Create alphabet
alphabet = MockAlphabet()
ARGS = {
'value': value,
'alphabet': alphabet
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, six, 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
|
| sum_probs |
Ran ran on a synthesized input |
raraz15/DeepTurkish/decoders/BeamSearch.py code served (permissive licence) · get_code("5e0550777bebd5b9") 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 float, 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.
import math
import torch
torch.manual_seed(0)
# The function takes two log probability values and combines them
# Both parameters are used as scalars in math.log and math.exp operations
# They should be floats or scalar tensors
ln_pa = -2.5
ln_pb = -3.1
ARGS = {
"ln_pa": ln_pa,
"ln_pb": ln_pb,
}
- 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 float, 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
|
| text_to_char_array |
Ran ran on a synthesized input |
bjtommychen/Keras_DeepSpeech2_SpeechRecognition/util/text.py code served (permissive licence) · get_code("752dbb28ff7a8b3a") 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 ndarray, ndim 1, dtype family int, shape (6,) 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 numpy as np
class Alphabet:
"""Stand-in alphabet class that maps characters to integers."""
def __init__(self):
self.char_to_label = {
'a': 0,
'b': 1,
'c': 2,
'd': 3,
'e': 4,
'f': 5,
'g': 6,
'h': 7,
}
def label_from_string(self, c):
"""Map a character to its integer label."""
return self.char_to_label.get(c, 0)
alphabet = Alphabet()
original = "abcdef"
ARGS = {
"original": original,
"alphabet": alphabet,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type ndarray, ndim 1, dtype family int, shape (6,) — shape (6,) 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
|
| to_np |
Ran ran on a synthesized input |
hkakitani/deepspeech.pytorch/deepspeech_pytorch/logger.py code served (permissive licence) · get_code("2e70840fa1254dee") 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 ndarray, 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 numpy as np
torch.manual_seed(0)
# The function to_np takes a tensor x and converts it to a numpy array
# It calls .cpu() and .numpy() on the input
# So x must be a torch.Tensor
x = torch.randn(2, 4)
ARGS = {
"x": x
}
- 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 ndarray, 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
|
| wordToLabelSeq |
Ran ran on a synthesized input |
raraz15/DeepTurkish/decoders/Common.py code served (permissive licence) · get_code("9a614a18231dc307") 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 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.
import torch
import numpy as np
torch.manual_seed(0)
# The function maps a word (string) to a sequence of labels (indices)
# It calls classes.index(c) for each character c in word w
# So 'classes' must be a list-like object with an index() method
w = "abc" # A simple word string
classes = ["a", "b", "c", "d"] # List of character classes
ARGS = {
"w": w,
"classes": classes,
}
- 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 1, dtype family int — 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
|
| audiofile_to_input_vector |
Not yet run unverified (harvested, no recorded run) |
bjtommychen/Keras_DeepSpeech2_SpeechRecognition/util/audio.py code served (permissive licence) · get_code("988e98b189398316") How it ran |
| cer |
Not yet run unverified (harvested, no recorded run) |
switiz/deepspeech2.pytorch/utils.py code served (permissive licence) · get_code("5eeba5cf42081f13") How it ran |
| ctcBeamSearch |
Not yet run unverified (harvested, no recorded run) |
raraz15/DeepTurkish/decoders/BeamSearch.py code served (permissive licence) · get_code("f764213dd1f6bff8") How it ran |
| ctc_lambda_func |
Not yet run unverified (harvested, no recorded run) |
bjtommychen/Keras_DeepSpeech2_SpeechRecognition/Keras_DS2_SpeechRecognition.py code served (permissive licence) · get_code("b671f5730f946b3d") How it ran |
| make_loaders |
Not yet run unverified (harvested, no recorded run) |
raraz15/DeepTurkish/model/data_loader.py code served (permissive licence) · get_code("612369e6364fb914") How it ran |
| sparse_tuple_from |
Not yet run unverified (harvested, no recorded run) |
bjtommychen/Keras_DeepSpeech2_SpeechRecognition/util/text.py code served (permissive licence) · get_code("796998505f97f73c") How it ran |