Skip to content

Update TGB TimeDelta Constants - #66

Merged
Jacob-Chmura merged 3 commits into
mainfrom
bug/tgb_time_scale
Jun 30, 2025
Merged

Update TGB TimeDelta Constants#66
Jacob-Chmura merged 3 commits into
mainfrom
bug/tgb_time_scale

Conversation

@Jacob-Chmura

Copy link
Copy Markdown
Member

Purpose

In preparation for #40, I had a look at our TGB time granularities:

tgm/tgm/timedelta.py

Lines 78 to 99 in 5b4949e

TGB_TIME_DELTAS = {
'tgbl-wiki': TimeDeltaDG('s'),
'tgbl-subreddit': TimeDeltaDG('r'),
'tgbl-lastfm': TimeDeltaDG('r'),
'tgbl-review': TimeDeltaDG('s'),
'tgbl-coin': TimeDeltaDG('r'),
'tgbl-flight': TimeDeltaDG('r'),
'tgbl-comment': TimeDeltaDG('r'),
'tgbn-trade': TimeDeltaDG('r'),
'tgbn-genre': TimeDeltaDG('r'),
'tgbn-reddit': TimeDeltaDG('r'),
'tgbn-token': TimeDeltaDG('r'),
'tkgl-polecat': TimeDeltaDG('r'),
'tkgl-icews': TimeDeltaDG('r'),
'tkgl-yago': TimeDeltaDG('r'),
'tkgl-wikidata': TimeDeltaDG('r'),
'tkgl-smallpedia': TimeDeltaDG('r'),
'thgl-myket': TimeDeltaDG('r'),
'thgl-github': TimeDeltaDG('r'),
'thgl-forum': TimeDeltaDG('r'),
'thgl-software': TimeDeltaDG('r'),
}

These do not match the reported time granularities in the original data, which I have verified by manually loading in timestamps.

Solution

I fixed the time granularities. I also removed `'tkgl-' and 'thgl-' graphs as we don't support loading them at the moment.

Relevant Prs

Fix #65

@Jacob-Chmura Jacob-Chmura self-assigned this Jun 26, 2025
@Jacob-Chmura
Jacob-Chmura marked this pull request as ready for review June 26, 2025 11:51
Comment thread test/test_timedelta.py

def test_tgb_native_time_deltas():
exp_dict = {
'tgbl-wiki': TimeDeltaDG('s'),

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

looks good to me, thanks for manually verifying

@Jacob-Chmura
Jacob-Chmura merged commit 312b5c1 into main Jun 30, 2025
5 checks passed
@Jacob-Chmura
Jacob-Chmura deleted the bug/tgb_time_scale branch June 30, 2025 14:10
@codecov

codecov Bot commented Jun 30, 2025

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!

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.

TGB Data Default Time Granularities do not match the paper

2 participants