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

removing start_date and end_date from configs #397

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

joker2411
Copy link
Collaborator

Description of the change

Ticket link.

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Related issues

Fix #1

Checklists

Development

  • Lint rules pass locally
  • The code changed/added as part of this pull request has been covered with tests
  • All tests related to the changed code pass in development

Code review

  • This pull request has a descriptive title and information useful to a reviewer. There may be a screenshot or screencast attached
  • "Ready for review" label attached to the PR and reviewers mentioned in a comment
  • Changes have been reviewed by at least one other engineer
  • Issue from task tracker has a link to this pull request

@joker2411 joker2411 marked this pull request as ready for review July 30, 2024 08:46
start_date, end_date = self.pythonWHT.get_date_range(
creation_ts, prediction_horizon_days
)
elif end_date is None:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's skip this. If end_date is none, we go to pythonWHT.get_date_range, irrespective of start_date.
We always check only for end_date. If it's None, we go to pythonWHT.
If it's not None, we then check for start_date, only for sanity. If (end_date - start_date ) is less than 2 times prediction_horizon_days, we raise an exception saying begin_time and end_time need to be atleast 2*prediction_horizon_days apart for the predictive feature.

If (end_date - start_date ) is greather than or equal to 2t times prediction_horizon_days, we again make a call to get_date_range with end_date as parameter (creation_ts=end_date).

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.

None yet

2 participants