Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Adjust evaluation business logic #535

Merged
merged 2 commits into from
Jun 20, 2024

Conversation

robinholzi
Copy link
Collaborator

@robinholzi robinholzi commented Jun 20, 2024

Motivation

  • We want to use the real_last_timestamp (start of next training interval - 1 --> marking end of current training interval) only for plotting the boxes in the heatmap plot. For decisions w.r.t. currently active models this doesn't for. E.g. if the next year in a dataset has no data at the year start, our training interval would extend into this next year and therefore it's model won't be considered for the current evaluation interval.
  • timetriggers should allow starting a statically defined start point (and not with the first sample), otherwise, the whole schedule is off a couple of days.

Note

Independently of the bug we fix with the start_timestamp in timetrigger, this setting allows us to effectively do pre-training with the first trigger (e.g. in the continous arxiv dataset we have sparse data from 1988 - ~2005). We could simply start the schedule in year 2005, then the first trigger trains on all previous data.

@robinholzi robinholzi self-assigned this Jun 20, 2024
@robinholzi robinholzi marked this pull request as ready for review June 20, 2024 15:59
import pandas as pd


def generate_real_training_end_timestamp(df_trainings: pd.DataFrame) -> pd.Series:
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

currently unused, will be used in analytics tool

@robinholzi robinholzi requested a review from MaxiBoether June 20, 2024 16:00
Copy link

codecov bot commented Jun 20, 2024

Codecov Report

Attention: Patch coverage is 64.28571% with 5 lines in your changes missing coverage. Please review.

Project coverage is 82.46%. Comparing base (cb0be37) to head (e1ee770).

Files Patch % Lines
modyn/supervisor/internal/utils/time_tools.py 0.00% 3 Missing ⚠️
modyn/supervisor/internal/triggers/timetrigger.py 77.77% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #535      +/-   ##
==========================================
- Coverage   82.49%   82.46%   -0.04%     
==========================================
  Files         215      216       +1     
  Lines       10054    10059       +5     
==========================================
+ Hits         8294     8295       +1     
- Misses       1760     1764       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@MaxiBoether MaxiBoether left a comment

Choose a reason for hiding this comment

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

LGTM. I guess in most cases one should set the start timestamp to 0, if they want a neat triggering boundary. But I guess finding the correct setting here is the task of the user.

Copy link

Line Coverage: -% ( % to main)
Branch Coverage: -% ( % to main)

MaxiBoether added a commit that referenced this pull request Jun 20, 2024
@MaxiBoether
Copy link
Contributor

i will wait for integrationtests to run through for this one and then merge

@robinholzi
Copy link
Collaborator Author

robinholzi commented Jun 20, 2024

LGTM. I guess in most cases one should set the start timestamp to 0, if they want a neat triggering boundary. But I guess finding the correct setting here is the task of the user.

For continuous datasets with periodic evaluation not necessarily. There you don't really care where it starts and what the exact bounds are, you just care about time proximity. But yes, for the current slicing approaches we need to set it!

@robinholzi
Copy link
Collaborator Author

@MaxiBoether could you kick off a cglm pipeline after merging this? I need a pipeline log file with correct training intervals (not affected by the first sample)

@MaxiBoether MaxiBoether merged commit beb3769 into main Jun 20, 2024
26 checks passed
@robinholzi robinholzi deleted the robinholzi/fix/eval-plotting-hot branch June 29, 2024 15:28
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.

2 participants