Skip to content

Added tkgl i/o - #371

Merged
ntgbaoo merged 11 commits into
mainfrom
303-KnowledgeGraph
Feb 15, 2026
Merged

Added tkgl i/o#371
ntgbaoo merged 11 commits into
mainfrom
303-KnowledgeGraph

Conversation

@ntgbaoo

@ntgbaoo ntgbaoo commented Jan 1, 2026

Copy link
Copy Markdown
Member

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

codecov Bot commented Jan 1, 2026

Copy link
Copy Markdown

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!

Comment thread test/integration/test_edgebank.py
Comment thread test/unit/test_core/test_dgraph.py
Comment thread test/unit/test_core/test_timedelta.py Outdated
Comment thread test/unit/test_data/test_data.py Outdated
Comment thread tgm/data/dg_data.py Outdated
@ntgbaoo
ntgbaoo marked this pull request as ready for review January 2, 2026 18:24
Comment thread tgm/data/dg_data.py Outdated
@ntgbaoo ntgbaoo self-assigned this Jan 3, 2026
@ntgbaoo ntgbaoo linked an issue Jan 4, 2026 that may be closed by this pull request
Comment thread test/integration/test_edgebank.py
Comment thread tgm/hooks/negatives.py
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

@ntgbaoo
ntgbaoo merged commit 72c8bf9 into main Feb 15, 2026
8 of 9 checks passed
@ntgbaoo
ntgbaoo deleted the 303-KnowledgeGraph branch May 6, 2026 02:21
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