-
Notifications
You must be signed in to change notification settings - Fork 96
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
Power-law histogram generations #1165
Conversation
lilac/data/dataset.py
Outdated
# Defined for numeric features. | ||
min_val: Optional[Union[float, date, datetime]] = None | ||
max_val: Optional[Union[float, date, datetime]] = None | ||
value_samples: Optional[list[float]] = None # Used for approximating histogram bins |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a list of 100 floats; no need to transmit this to the client but I was too lazy to figure out how to nullify this when serializing the field
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can nullify in get_stats in router_dataset.py right before returning the result, but no big deal
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, figured out how to exclude in pydantic
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice work!
lilac/data/dataset.py
Outdated
# Defined for numeric features. | ||
min_val: Optional[Union[float, date, datetime]] = None | ||
max_val: Optional[Union[float, date, datetime]] = None | ||
value_samples: Optional[list[float]] = None # Used for approximating histogram bins |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can nullify in get_stats in router_dataset.py right before returning the result, but no big deal
Fixes #1161 partially. (by generating better distributions). If there are 95% NaN, then this still causes lopsided bars that don't represent value ranges properly.