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

Speed improvements to RadarDataset #85

Merged
merged 6 commits into from
May 10, 2023
Merged

Speed improvements to RadarDataset #85

merged 6 commits into from
May 10, 2023

Conversation

abelsiqueira
Copy link
Contributor

Description

Many improvements to RadarDataset.

Related issues:

Instructions to review the pull request

The following script ran on 271.5 seconds on SURF Research Cloud:

import time

from bird_cloud_gnn.radar_dataset import RadarDataset

st = time.perf_counter()
try:
    dataset = RadarDataset(
        "data/parquet",
        ["x", "y", "z"],
        "BIOLOGY",
        min_neighbours=25,
        max_distance=500.0,
        max_edge_distance=250.1,
    )
    print(dataset)
    print(dataset[0])
    print(dataset[0][0])
except ValueError as ex:
    print("Error:", ex)
print("Total time:", time.perf_counter() - st)

data/parquet contains all data converted to parquet files (114 files). The results:

Dataset("Radar", num_graphs=383288, save_path=/home/asoaressiq/.dgl/Radar)
(Graph(num_nodes=25, num_edges=487,
      ndata_schemes={'x': Scheme(shape=(3,), dtype=torch.float64)}
      edata_schemes={'a': Scheme(shape=(), dtype=torch.float64)}), tensor(0))
Graph(num_nodes=25, num_edges=487,
      ndata_schemes={'x': Scheme(shape=(3,), dtype=torch.float64)}
      edata_schemes={'a': Scheme(shape=(), dtype=torch.float64)})
Total time: 271.5795489749871

@sonarcloud
Copy link

sonarcloud bot commented May 9, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

94.4% 94.4% Coverage
0.0% 0.0% Duplication

@bart1
Copy link
Collaborator

bart1 commented May 9, 2023

That looks very quick! I'm currently also playing around with it.

@lyashevska lyashevska merged commit 62fad20 into main May 10, 2023
@lyashevska lyashevska deleted the faster branch June 19, 2023 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants