Skip to content

Added tkgl i/o#371

Merged
benjaminnNgo merged 11 commits intomainfrom
303-KnowledgeGraph
Feb 15, 2026
Merged

Added tkgl i/o#371
benjaminnNgo merged 11 commits intomainfrom
303-KnowledgeGraph

Conversation

@benjaminnNgo
Copy link
Copy Markdown
Contributor

@benjaminnNgo benjaminnNgo commented Jan 1, 2026

Summary / Description

Added TGB-tkgl . EdgeBank performance matches TGB leader board:

[2026-01-01 18:18:23.714] tgm.nn.modules.edgebank - WARNING - EdgeBank will be slow if events are added/updated out of order.
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 811/811 [32:23<00:00,  2.40s/it]
[2026-01-01 18:50:59.309] tgm.util.logging - INFO - Function eval executed in 1943.3841s
[2026-01-01 18:50:59.309] tgm.util.logging - INFO - Validation mrr=0.4005
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 816/816 [33:48<00:00,  2.49s/it]
[2026-01-01 19:24:47.474] tgm.util.logging - INFO - Function eval executed in 2028.1643s
[2026-01-01 19:24:47.474] tgm.util.logging - INFO - Test mrr=0.3329

Related Issues: #303

Type of Change

  • Bug fix
  • New feature
  • Breaking Change
  • Refactoring
  • Documentation update

Test Evidence

Describe how this PR has been tested.

  • Unit tests
  • Integration tests
  • Performance tests

Questions / Discussion Points

List any areas where you’d like reviewer input or have open questions.

@codecov
Copy link
Copy Markdown

codecov bot commented Jan 1, 2026

Codecov Report

❌ Patch coverage is 94.00000% with 3 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
tgm/hooks/negatives.py 92.68% 3 Missing ⚠️

📢 Thoughts on this report? Let us know!

@benjaminnNgo benjaminnNgo marked this pull request as ready for review January 2, 2026 18:24
@benjaminnNgo benjaminnNgo self-assigned this Jan 3, 2026
@benjaminnNgo benjaminnNgo linked an issue Jan 4, 2026 that may be closed by this pull request
Comment on lines +331 to +345
# Load evaluation sets
root = Path(PROJ_DIR + 'datasets') / dataset_name.replace('-', '_')
if DATA_VERSION_DICT.get(dataset_name, 1) > 1:
version_suffix = f'_v{DATA_VERSION_DICT[dataset_name]}'
else:
version_suffix = ''

ns_fname = root / f'{dataset_name}_{split_mode}_ns{version_suffix}.pkl'
logger.debug(
'Loading %s split (neg_sampler.load_eval_set) for dataset: %s from file: %s',
split_mode,
dataset_name,
ns_fname,
)
neg_sampler.load_eval_set(fname=str(ns_fname), split_mode=split_mode)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: We could potentially create a helper to share this logic with TGBNegativeEdgeSamplerHook

@benjaminnNgo benjaminnNgo merged commit 72c8bf9 into main Feb 15, 2026
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Temporal Knowledge Graph Support

3 participants