Skip to content

Commit

Permalink
Added zenodo version of ubergraph
Browse files Browse the repository at this point in the history
  • Loading branch information
LucaCappelletti94 committed Aug 24, 2022
1 parent 3c0df77 commit fb1c30f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 23 deletions.
23 changes: 0 additions & 23 deletions graph/cpu_models/src/wine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ use crate::{
use core::sync::atomic::Ordering;
use ensmallen_traits::prelude::*;
use graph::{Graph, NodeT};
use indicatif::{ParallelProgressIterator, ProgressBar, ProgressStyle};
use rayon::prelude::*;
use vec_rand::splitmix64;

Expand Down Expand Up @@ -44,10 +43,6 @@ impl BasicWINE {
pub fn get_basic_inferred_node_embedding(&self) -> &BasicAnchorsInferredNodeEmbedding {
&self.baine
}

pub fn is_verbose(&self) -> bool {
self.baine.is_verbose()
}
}

pub trait WINEBased {
Expand Down Expand Up @@ -90,22 +85,6 @@ where
let mut random_walk_length: Feature = Feature::ZERO;
let mut random_state = splitmix64(self.get_random_state());

// Depending whether verbosity was requested by the user
// we create or not a visible progress bar to show the progress
// in the computation of the features.
let depth_progress = if self.get_basic_wine().is_verbose() {
let pb = ProgressBar::new(self.get_walk_length() as u64);
pb.set_style(ProgressStyle::default_bar().template(concat!(
"depth {spinner:.green} [{elapsed_precise}] ",
"[{bar:40.cyan/blue}] ({pos}/{len}, ETA {eta})"
)));
pb
} else {
ProgressBar::hidden()
};

depth_progress.inc(0);

// Until the bucket is not empty we start to iterate.
let max_depth = Feature::try_from(self.get_walk_length()).unwrap_or(Feature::MAX);
while !bucket.is_empty() {
Expand Down Expand Up @@ -161,7 +140,6 @@ where
})
.collect::<Vec<NodeT>>();
}
depth_progress.inc(1);
} else {
// We compute the next bucket of nodes, i.e. the next step of the frontier.
if random_walk_length == (Feature::ONE + Feature::ONE) {
Expand All @@ -185,7 +163,6 @@ where
});
});
}
depth_progress.inc(1);
return;
}
}
Expand Down
17 changes: 17 additions & 0 deletions notebooks_and_scripts/graph_miner/repositories/zenodo.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,5 +75,22 @@
"name": "Game of Thrones Characters Interactions"
}
}
},
"Ubergraph": {
"latest": {
"urls": [
"https://zenodo.org/record/7020394/files/ubergraph_edge_list.tsv.gz"
],
"paths": [
"ubergraph_edge_list.tsv.gz"
],
"arguments": {
"edge_path": "ubergraph_edge_list.tsv",
"sources_column": "source",
"destinations_column": "destination",
"edge_list_edge_types_column": "edge_type",
"name": "Ubergraph"
}
}
}
}

0 comments on commit fb1c30f

Please sign in to comment.