SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2004.08532 · 2020

DGL-KE: Training Knowledge Graph Embeddings at Scale

arXiv · PDF · Open in the Atlas

Code that ran

18 of 25 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 18 have no contract verdict; 0 failures of our instrument; 7 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2004.08532.json · badge: /api/ran/2004.08532.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
awslabs/dgl-ke canonical (classifier label)
classifier basis: census
5 ran · 5 no recorded run
idirlab/freebases community (classifier label)
classifier basis not recorded on the link
13 ran · 2 no recorded run
FunctionStatusWhere it lives
cartesian_relations Ran
ran on a synthesized input
idirlab/freebases/DataPreparationScripts/cartesian.py
code served (permissive licence) · get_code("dd8acaaab9a42aa5")
How it ran

Ran 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 pandas as pd

# Construct all_triples as a dictionary where:
# - keys are relation names (strings)
# - values are lists of [Head, Tail] pairs
all_triples = {
    'relation_1': [
        ['entity_a', 'entity_x'],
        ['entity_a', 'entity_y'],
        ['entity_b', 'entity_x'],
        ['entity_b', 'entity_y'],
    ],
    'relation_2': [
        ['entity_1', 'entity_p'],
        ['entity_2', 'entity_q'],
    ],
    'relation_3': [
        ['entity_m', 'entity_n'],
        ['entity_m', 'entity_o'],
        ['entity_m', 'entity_p'],
    ],
    'relation_4': [
        ['entity_x', 'entity_y'],
    ],
}

ARGS = {
    'all_triples': all_triples,
    'threshold': 0.8,
}
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 — 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
check_port_available Ran
ran on a synthesized input
awslabs/dgl-ke/python/dglke/kvserver.py
code served (permissive licence) · get_code("bc3a10c2f9154e25")
How it ran

Ran 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 socket

# The function check_port_available takes a port number as argument
# It attempts to bind to that port and returns True if available, False if not
# We need to provide a valid port number

ARGS = {
    "port": 9999
}
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
create_triples Ran
ran on a synthesized input
idirlab/freebases/DataPreparationScripts/cartesian.py
code served (permissive licence) · get_code("0c1f71b8bac6e691")
How it ran

Ran 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 defaultdict. 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 tempfile
import os

# Create temporary files with sample data
temp_dir = tempfile.mkdtemp()
train_file = os.path.join(temp_dir, 'train.txt')
test_file = os.path.join(temp_dir, 'test.txt')
valid_file = os.path.join(temp_dir, 'valid.txt')

# Write sample triple data to files
with open(train_file, 'w') as f:
    f.write("entity1,relation1,entity2\n")
    f.write("entity3,relation2,entity4\n")

with open(test_file, 'w') as f:
    f.write("entity5,relation1,entity6\n")
    f.write("entity7,relation3,entity8\n")

with open(valid_file, 'w') as f:
    f.write("entity9,relation2,entity10\n")
    f.write("entity11,relation1,entity12\n")

ARGS = {
    'train_file': train_file,
    'test_file': test_file,
    'valid_file': valid_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 defaultdict — a defaultdict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a defaultdict 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_triples Ran
ran on a synthesized input
idirlab/freebases/DataPreparationScripts/duplicate.py
code served (permissive licence) · get_code("391f5f5a397f785d")
How it ran

Ran 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 tempfile
import os

# Create temporary files with sample triple data
temp_dir = tempfile.mkdtemp()

train_file = os.path.join(temp_dir, "train.txt")
test_file = os.path.join(temp_dir, "test.txt")
valid_file = os.path.join(temp_dir, "valid.txt")

# Write sample training data
with open(train_file, 'w') as f:
    f.write("alice,knows,bob\n")
    f.write("bob,knows,charlie\n")
    f.write("alice,likes,charlie\n")

# Write sample test data
with open(test_file, 'w') as f:
    f.write("charlie,knows,alice\n")
    f.write("bob,likes,alice\n")

# Write sample validation data
with open(valid_file, 'w') as f:
    f.write("alice,knows,bob\n")
    f.write("david,knows,eve\n")

ARGS = {
    "train_file": train_file,
    "test_file": test_file,
    "valid_file": valid_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 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
duplicate_relations Ran
ran on a synthesized input
idirlab/freebases/DataPreparationScripts/duplicate.py
code served (permissive licence) · get_code("cbf9223db5e0b8ba")
How it ran

Ran 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.

from random import choices

# Analyze the function to understand what it needs:
# - all_triples: a dict mapping relation IDs to lists of triples/values
# - sorted_dict: a list/sequence of relation IDs (sorted)
# - i1, i2: integer indices for range
# - threshold1, threshold2: floats (have defaults)

# The function iterates through sorted_dict indices and accesses all_triples with relation IDs
# It performs set operations on the values, so they need to be iterable and support set intersection

# Create sample data
all_triples = {
    'rel_1': [('a', 'b'), ('c', 'd'), ('e', 'f'), ('g', 'h')],
    'rel_2': [('a', 'b'), ('c', 'd'), ('x', 'y')],
    'rel_3': [('m', 'n'), ('o', 'p'), ('q', 'r')],
    'rel_4': [('a', 'b'), ('c', 'd'), ('e', 'f'), ('s', 't'), ('u', 'v')],
}

# sorted_dict should be a list of keys from all_triples, potentially sorted by some criteria
# The function uses it as: sorted_dict[i] to get relation IDs, and iterates with "for r2 in sorted_dict"
sorted_dict = ['rel_1', 'rel_2', 'rel_3', 'rel_4']

# Range indices
i1 = 0
i2 = 2

# Thresholds
threshold1 = 0.8
threshold2 = 0.8

ARGS = {
    'all_triples': all_triples,
    'sorted_dict': sorted_dict,
    'i1': i1,
    'i2': i2,
    'threshold1': threshold1,
    'threshold2': threshold2,
}
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
entity_dict Ran
ran on a synthesized input
idirlab/freebases/ExperimentsScripts/data_preparation/create_er_dicts.py
code served (permissive licence) · get_code("e9baa88374fa3160")
How it ran

Ran 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 defaultdict. 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 tempfile
import os

# Create a temporary CSV file with test data
temp_file = tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.csv')
temp_file.write("Alice,knows,Bob\n")
temp_file.write("Bob,likes,Charlie\n")
temp_file.write("Charlie,knows,Diana\n")
temp_file.close()

ARGS = {
    'filename': temp_file.name
}
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 defaultdict — a defaultdict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a defaultdict 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
find_edge_domain Ran
ran on a synthesized input
idirlab/freebases/ExperimentsScripts/FB1_statistics_domain_triples_relations.py
code served (permissive licence) · get_code("36dfb609acf78036")
How it ran

Ran 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 find_edge_domain(edge_label):
    a = '/(.*?)/'
    slotList = re.findall(a, edge_label)
    return slotList[0]

ARGS = {
    'edge_label': '/domain_value/'
}
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
get_id2label Ran
ran on a synthesized input
idirlab/freebases/ExperimentsScripts/FB1_statistics_domain_triples_relations.py
code served (permissive licence) · get_code("5b9798142c710f46")
How it ran

Ran 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 dict. 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 tempfile
import os

# Create a temporary file with CSV-like content
temp_file = tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.txt')
temp_file.write("label_0,0\n")
temp_file.write("label_1,1\n")
temp_file.write("label_2,2\n")
temp_file.flush()
temp_file.close()

file_path = temp_file.name

ARGS = {
    "file_path": file_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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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_long_tail_partition Ran
ran on a synthesized input
awslabs/dgl-ke/python/dglke/kvclient.py
code served (permissive licence) · get_code("210da1d26a3627d6")
How it ran

Ran 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)

# Construct valid arguments for get_long_tail_partition
ARGS = {
    'n_relations': 10,
    'n_machine': 3
}
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
get_machine_count Ran
ran on a synthesized input
awslabs/dgl-ke/python/dglke/dist_train.py
code served (permissive licence) · get_code("2d755fd7759a79cc")
How it ran

Ran 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 tempfile
import os

# Create a temporary file with some machine IP addresses (one per line)
temp_file = tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.txt')
temp_file.write("192.168.1.1\n")
temp_file.write("192.168.1.2\n")
temp_file.write("192.168.1.3\n")
temp_file.close()

ARGS = {
    'ip_config': temp_file.name
}
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 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
get_machine_count Ran
ran on a synthesized input
awslabs/dgl-ke/python/dglke/kvclient.py
code served (permissive licence) · get_code("14d9fe99228da0c1")
How it ran

Ran 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 tempfile
import os

# Create a temporary file with multiple lines to simulate an IP config
temp_file = tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.txt')
temp_file.write("192.168.1.1\n")
temp_file.write("192.168.1.2\n")
temp_file.write("192.168.1.3\n")
temp_file.close()

ARGS = {
    "ip_config": temp_file.name
}
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 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
index_relation_types Ran
ran on a synthesized input
idirlab/freebases/ExperimentsScripts/kge/kge/indexing.py
code served (permissive licence) · get_code("8de5ea6adbb76af2")
How it ran

Ran 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

torch.manual_seed(0)

class MockDataset:
    def __init__(self):
        self._indexes = {}
        self._num_relations = 3
        # Create mock indices for train_sp_to_o and train_po_to_s
        # These map (subject/predicate, predicate/object) tuples to lists of objects/subjects
        self._train_sp_to_o = {
            (0, 0): [1, 2],           # subject 0, predicate 0 -> objects [1, 2]
            (0, 1): [1],              # subject 0, predicate 1 -> object [1]
            (1, 0): [2],              # subject 1, predicate 0 -> object [2]
            (1, 1): [0, 1, 2],        # subject 1, predicate 1 -> objects [0, 1, 2]
            (2, 2): [1],              # subject 2, predicate 2 -> object [1]
        }
        self._train_po_to_s = {
            (0, 0): [0, 1],           # predicate 0, object 0 -> subjects [0, 1]
            (0, 1): [0],              # predicate 0, object 1 -> subject [0]
            (1, 1): [0, 1],           # predicate 1, object 1 -> subjects [0, 1]
            (1, 2): [1],              # predicate 1, object 2 -> subject [1]
            (2, 1): [2],              # predicate 2, object 1 -> subject [2]
        }
    
    def num_relations(self):
        return self._num_relations
    
    def index(self, index_name):
        if index_name == 'train_sp_to_o':
            return self._train_sp_to_o
        elif index_name == 'train_po_to_s':
            return self._train_po_to_s
        else:
            raise ValueError(f"Unknown index: {index_name}")

dataset = MockDataset()

ARGS = {
    'dataset': dataset
}
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
index_relations_per_type Ran
ran on a synthesized input
idirlab/freebases/ExperimentsScripts/kge/kge/indexing.py
code served (permissive licence) · get_code("016f6033e3fdf5c1")
How it ran

Ran 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 dict. 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

class MockConfig:
    def __init__(self):
        self.logs = []
    
    def log(self, message, prefix=''):
        self.logs.append(prefix + message)

class MockDataset:
    def __init__(self):
        self._indexes = {}
        self.config = MockConfig()
        self._relation_types = ['type_A', 'type_B', 'type_A', 'type_C', 'type_B', 'type_A']
    
    def index(self, key):
        if key == 'relation_types':
            return self._relation_types
        raise KeyError(f"Unknown index key: {key}")

ARGS = {
    'dataset': MockDataset()
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
read_dict Ran
ran on a synthesized input
idirlab/freebases/ExperimentsScripts/data_preparation/map_triples_to_ids.py
code served (permissive licence) · get_code("df9fc541b4d9d076")
How it ran

Ran 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 defaultdict. 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 tempfile
import os

# Create a temporary CSV file with test data
temp_file = tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.csv')
temp_file.write("key1,value1\n")
temp_file.write("key2,value2\n")
temp_file.write("key1,value3\n")
temp_file.write("invalid_line_without_comma\n")
temp_file.write("key3,value4\n")
temp_file.close()

ARGS = {
    'filename': temp_file.name
}
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 defaultdict — a defaultdict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a defaultdict 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
read_file Ran
ran on a synthesized input
idirlab/freebases/ExperimentsScripts/FB1_statistics_domain_triples_relations.py
code served (permissive licence) · get_code("da36ef8474d88ac2")
How it ran

Ran 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 tempfile
import os

# Create a temporary file with CSV data
temp_file = tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.csv')
temp_file.write("subject1,predicate1,object1\n")
temp_file.write("subject2,predicate2,object2\n")
temp_file.write("subject3,predicate3,object3\n")
temp_file.close()

file_path = temp_file.name

ARGS = {
    "file_path": file_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 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
relation_dict Ran
ran on a synthesized input
idirlab/freebases/ExperimentsScripts/data_preparation/create_er_dicts.py
code served (permissive licence) · get_code("e71bc2d8ce60d3ff")
How it ran

Ran 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 defaultdict. 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 tempfile
import os

# Create a temporary file with CSV content matching the function's expectations
temp_file = tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.csv')
temp_file.write("entity1,relation1,entity2\n")
temp_file.write("entity3,relation2,entity4\n")
temp_file.write("entity5,relation1,entity6\n")
temp_file.write("entity7,relation3,entity8\n")
temp_file.close()

ARGS = {
    'filename': temp_file.name
}
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 defaultdict — a defaultdict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a defaultdict 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
replaceWID Ran
ran on a synthesized input
idirlab/freebases/ExperimentsScripts/data_preparation/map_triples_to_ids.py
code served (permissive licence) · get_code("a058bd02af0f0c57")
How it ran

Ran 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 temporary file with sample data
temp_file = tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.txt')
temp_file.write("entity1,relation1,entity2\n")
temp_file.write("entity3,relation2,entity4\n")
temp_file.write("entity5,relation3,entity6\n")
temp_file.close()

# Create dicE: maps entity names to lists containing ID strings
dicE = {
    "entity1": ["0"],
    "entity2": ["1"],
    "entity3": ["2"],
    "entity4": ["3"],
    "entity5": ["4"],
    "entity6": ["5"]
}

# Create dicR: maps relation names to lists containing ID strings
dicR = {
    "relation1": ["10"],
    "relation2": ["11"],
    "relation3": ["12"]
}

# Define arguments
ARGS = {
    "dicE": dicE,
    "dicR": dicR,
    "filename": temp_file.name
}
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
run_cmd Ran
ran on a synthesized input
awslabs/dgl-ke/python/dglke/dist_train.py
code served (permissive licence) · get_code("13997ea0dc0416ad")
How it ran

Ran 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 Popen. 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 os
import subprocess

# The function run_cmd takes a cmd_str parameter which should be a command string
# or a list of command arguments (since shell=False is used, it expects a list/sequence)
# Looking at the subprocess.Popen call with shell=False, cmd_str should be a list of strings

ARGS = {
    "cmd_str": ["echo", "hello world"]
}
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 Popen — a Popen output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Popen 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_local_machine_id Not yet run
unverified (harvested, no recorded run)
awslabs/dgl-ke/python/dglke/kvclient.py
code served (permissive licence) · get_code("51ced90c9fe3686a")
How it ran

no invocation recorded.

get_server_data Not yet run
unverified (harvested, no recorded run)
awslabs/dgl-ke/python/dglke/kvserver.py
code served (permissive licence) · get_code("249d1c8c4c51f698")
How it ran

no invocation recorded.

index_KvsAll Not yet run
unverified (harvested, no recorded run)
idirlab/freebases/ExperimentsScripts/kge/kge/indexing.py
code served (permissive licence) · get_code("79e8c86b8cbf34bf")
How it ran

no invocation recorded.

is_local Not yet run
unverified (harvested, no recorded run)
awslabs/dgl-ke/python/dglke/dist_train.py
code served (permissive licence) · get_code("1bed5159d4510f5a")
How it ran

no invocation recorded.

load_model Not yet run
unverified (harvested, no recorded run)
awslabs/dgl-ke/python/dglke/train_mxnet.py
code served (permissive licence) · get_code("099352c8df6bbfe5")
How it ran

no invocation recorded.

load_model_from_checkpoint Not yet run
unverified (harvested, no recorded run)
awslabs/dgl-ke/python/dglke/train_mxnet.py
code served (permissive licence) · get_code("4bc4112f66051106")
How it ran

no invocation recorded.

splitData Not yet run
unverified (harvested, no recorded run)
idirlab/freebases/ExperimentsScripts/data_preparation/split_no_cvt_data.py
code served (permissive licence) · get_code("a943b8e45daa74e9")
How it ran

no invocation recorded.

Also present in other papers' code

Of 25 samples lifted from this paper's linked repositories, 25 carry a function identity and 0 do not. Of the 24 distinct functions with an identity, 3 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 3 later) and 21 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
index_KvsAll 2 other papers
1 later, 1 same year, order not determinable
2020.emnlp-demos.22 (2020 (year only))
LibKGE A knowledge graph embedding library for reproducible research
2106.12144 (2021-06)
NodePiece: Compositional and Parameter-Efficient Representations of Large Knowledge Graphs
index_relation_types 2 other papers
1 later, 1 same year, order not determinable
2020.emnlp-demos.22 (2020 (year only))
LibKGE A knowledge graph embedding library for reproducible research
2106.12144 (2021-06)
NodePiece: Compositional and Parameter-Efficient Representations of Large Knowledge Graphs
index_relations_per_type 2 other papers
1 later, 1 same year, order not determinable
2020.emnlp-demos.22 (2020 (year only))
LibKGE A knowledge graph embedding library for reproducible research
2106.12144 (2021-06)
NodePiece: Compositional and Parameter-Efficient Representations of Large Knowledge Graphs

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Knowledge graphs have emerged as a key abstraction for organizing information in diverse domains and their embeddings are increasingly used to harness their information in various information retrieval and machine learning tasks. However, the ever growing size of knowledge graphs requires computationally efficient algorithms capable of scaling to graphs with millions of nodes and billions of edges. This paper presents DGL-KE, an open-source package to efficiently compute knowledge graph embeddings. DGL-KE introduces various novel optimizations that accelerate training on knowledge graphs with millions of nodes and billions of edges using multi-processing, multi-GPU, and distributed parallelism. These optimizations are designed to increase data locality, reduce communication overhead, overlap computations with memory accesses, and achieve high operation efficiency. Experiments on knowledge graphs consisting of over 86M nodes and 338M edges show that DGL-KE can compute embeddings in 100 minutes on an EC2 instance with 8 GPUs and 30 minutes on an EC2 cluster with 4 machines with 48 cores/machine. These results represent a 2x~5x speedup over the best competing approaches. DGL-KE is available on https://github.com/awslabs/dgl-ke.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2004.08532")
get_code_for_paper("2004.08532")
have("2004.08532")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2004.08532.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2004.08532.svg)](https://syntology.ai/paper/2004.08532)

Connect an agent — have() is free.