Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions requirements/requirements.train.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ scipy
torch
pyarrow
polars
click
optuna
6 changes: 1 addition & 5 deletions src/base/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,7 @@ def normalize_ipv4_address(
address: ipaddress.IPv4Address, prefix_length: int
) -> tuple[ipaddress.IPv4Address, int]:
"""
Returns the first part of an IPv4 address, the rest is filled with 0. For example:
>>> normalize_ipv4_address(ipaddress.IPv4Address("255.255.255.255"), 23)
(IPv4Address('255.255.254.0'), 23)
>>> normalize_ipv4_address(ipaddress.IPv4Address("172.126.15.3"), 8)
(IPv4Address('172.0.0.0'), 8)
Returns the first part of an IPv4 address, the rest is filled with 0.

Args:
address (ipaddress.IPv4Address): The IPv4 address to get the subnet ID of
Expand Down
Loading