-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3c395b8
commit 0c0f6fc
Showing
14 changed files
with
257 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,5 +5,6 @@ | |
"page_size" : "16.384 KB", | ||
"feature_dimension" : 128, | ||
"feature_size" : "float32" | ||
} | ||
}, | ||
"sampling_depth" : 2 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"dataset_name" : "ogbn_arxiv", | ||
"features_stats" : { | ||
"featurizer_type" : "default", | ||
"page_size" : "16.384 KB", | ||
"feature_dimension" : 128, | ||
"feature_size" : "float32" | ||
}, | ||
"top_percent_in_mem" : 1 | ||
} |
4 changes: 2 additions & 2 deletions
4
simulator/configs/arvix.json → simulator/configs/arvix_metis.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"dataset_name" : "ogbn_products", | ||
"features_stats" : { | ||
"featurizer_type" : "default", | ||
"page_size" : "16.384 KB", | ||
"feature_dimension" : 100, | ||
"feature_size" : "float32" | ||
}, | ||
"sampling_depth" : 1 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import heapq | ||
|
||
|
||
class InMemoryStorage: | ||
def __init__(self, data_loader, percent_in_memory): | ||
self.percent_in_memory = percent_in_memory | ||
total_nodes = data_loader.get_num_nodes() | ||
nodes_in_mem = int((total_nodes * self.percent_in_memory) / 100.0) | ||
|
||
# Get the top nodes based on incoming neighbors | ||
heap = [] | ||
for node_id in range(total_nodes): | ||
num_incoming = data_loader.get_incoming_neighbors(node_id) | ||
heapq.heappush(heap, (num_incoming, node_id)) | ||
|
||
top_pairs = heapq.nlargest(nodes_in_mem, heap) | ||
self.in_memory_nodes = set([pair[1] for pair in top_pairs]) | ||
|
||
def node_in_mem_storage(self, node_id): | ||
return node_id in self.in_memory_nodes | ||
|
||
def get_percentage_in_mem(self): | ||
return self.percent_in_memory | ||
|
||
def in_mem_nodes_count(self): | ||
return len(self.in_memory_nodes) |
Oops, something went wrong.