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

Address failing benchmarks #532

Merged
merged 1 commit into from
Dec 18, 2024
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
3 changes: 2 additions & 1 deletion benchmarks/asv.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
"HEAD"
],
"install_command": [
"python -mpip install -r requirements.txt {wheel_file}"
"python -mpip install -r requirements.txt {wheel_file}",
"python -mpip install .[full]"
],
"build_command": [
"python -m build --wheel -o {build_cache_dir} {build_dir}"
Expand Down
9 changes: 6 additions & 3 deletions benchmarks/benchmarks.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def time_polygon_search():
catalog_dec = upsample_array(small_sky_order1["dec"].to_numpy(), 10_000)
# Define sky polygon to use in search
vertices = [(300, -50), (300, -55), (272, -55), (272, -50)]
polygon, _ = get_cartesian_polygon(vertices)
polygon = get_cartesian_polygon(vertices)
# Apply vectorized filtering on the catalog points
polygon.contains(np.radians(catalog_ra), np.radians(catalog_dec))

Expand All @@ -57,9 +57,12 @@ def time_box_filter_on_partition():
"""Time box search on a single partition"""
metadata = load_small_sky_order1().hc_structure
mock_partition_df = pd.DataFrame(
np.linspace(-1000, 1000, 100_000), columns=[metadata.catalog_info.ra_column]
{
metadata.catalog_info.ra_column: np.linspace(-1000, 1000, 100_000),
metadata.catalog_info.dec_column: np.linspace(-90, 90, 100_000),
}
)
box_filter(mock_partition_df, ra=(-20, 40), dec=None, metadata=metadata.catalog_info)
box_filter(mock_partition_df, ra=(-20, 40), dec=(-90, 90), metadata=metadata.catalog_info)


def time_create_midsize_catalog():
Expand Down
Loading