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

[BUG] Random Forest fails to generate output with date in the past #53

Open
verovaleros opened this issue Oct 29, 2024 · 0 comments
Open
Labels
bug Something isn't working

Comments

@verovaleros
Copy link
Member

When AIP is run on an earlier date, all models succeed except RF:
docker run --rm -v /opt/zeek/logs/:/home/aip/AIP/data/raw:ro -v ${PWD}/data/:/home/aip/AIP/data/:rw --name aip aip:latest bin/aip --date 2024-10-27 -v

2024-10-29 08:35:49,913 - root - ERROR - Error running Random_Forest model: date value out of range
Traceback (most recent call last):
  File "/home/aip/AIP/bin/aip", line 56, in run_model
    blocklist = aip_model.run(date_day)
                ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/aip/AIP/lib/aip/models/prioritize.py", line 255, in run
    training, target = self._get_training_target_set(for_date=for_date)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/aip/AIP/lib/aip/models/prioritize.py", line 240, in _get_training_target_set
    training = Knowledgebase(load_until=for_date - timedelta(days=2))
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/aip/AIP/lib/aip/models/prioritize.py", line 116, in __init__
    self._load_knowledge_until(day)
  File "/home/aip/AIP/lib/aip/models/prioritize.py", line 106, in _load_knowledge_until
    self.build(end=datetime.strptime(day, '%Y-%m-%d').date())
  File "/home/aip/AIP/lib/aip/models/prioritize.py", line 133, in build
    day = str(end - timedelta(days=days_ago))
              ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
OverflowError: date value out of range
@verovaleros verovaleros added the bug Something isn't working label Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: 🆕 New
Development

No branches or pull requests

1 participant