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: Heuristics that determine the default start date of the forward-only preview plan #3043

Merged
merged 1 commit into from
Aug 26, 2024

Conversation

izeigerman
Copy link
Member

It should use the minimum value among the maximum interval end values to make a more accurate estimate for models whose cron is not aligned with a day boundary.

@izeigerman izeigerman requested a review from a team August 26, 2024 02:50
default_end = None

default_start = to_date(default_end) - timedelta(days=1) if default_end and is_dev else None
default_start = to_date(min(max_interval_end_per_model.values())) - timedelta(
Copy link
Contributor

Choose a reason for hiding this comment

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

why don’t you need the else branch anymore?

Copy link
Member Author

@izeigerman izeigerman Aug 26, 2024

Choose a reason for hiding this comment

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

Because we initialize this value to None at the top. No need to set None again.

@izeigerman izeigerman merged commit fb99dcb into main Aug 26, 2024
21 checks passed
@izeigerman izeigerman deleted the fix-default-start-inference-forward-only-preview branch August 26, 2024 15:22
izeigerman added a commit that referenced this pull request Aug 26, 2024
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