autogluon / autogluon/autogluon
Replace `time.time` with `time.monotonic`
- Dominant language
- Python
- Stars
- 10.7k
- Forks
- 1.2k
- Avg merge
- 21h 29m
- Merged PRs (30d)
- 57
Description
We should replace all usage of `time.time()` with `time.monotonic()`.
`time.time()` is influenced by the system clock. This means if the system clock is changed during fit, then AutoGluon could incorrectly run for longer or shorter times than intended.
`time.monotonic()` does not care about the system clock, and should be more trustworthy.
https://docs.python.org/3/library/time.html#time.time
https://docs.python.org/3/library/time.html#time.monotonic
Kudos to @eddiebergman for making us aware of this.
Contributor guide
Research direction
Search the repository for every use of time.time() and inspect the timing paths around fit. Confirm each elapsed-time calculation uses a clock unaffected by system-clock changes, then run the tests covering the affected components and verify fitting durations remain correct.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning, performance
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100