Skip to content

Commit

Permalink
using streaming for the project
Browse files Browse the repository at this point in the history
  • Loading branch information
angelip2303 committed May 24, 2023
1 parent 03aaa27 commit ca40f17
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pregel-rs"
version = "0.0.7"
version = "0.0.8"
authors = [ "Ángel Iglesias Préstamo <[email protected]>" ]
description = "A Graph library written in Rust for implementing your own algorithms in a Pregel fashion"
documentation = "https://docs.rs/crate/pregel-rs/latest"
Expand All @@ -12,7 +12,7 @@ keywords = ["pregel", "graph", "pagerank", "polars", "algorithms"]
categories = ["algorithms", "database", "mathematics", "science"]

[dependencies]
polars = { version = "0.29.0", features = ["lazy"] }
polars = { version = "0.29.0", features = ["lazy", "streaming"] }

[package.metadata.docs.rs]
features = []
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ of your project. You can add the following line to your `Cargo.toml` file:

```toml
[dependencies]
pregel-rs = "0.0.7"
pregel-rs = "0.0.8"
```

4. _Implement your graph algorithm_: Now you can start implementing your graph
Expand Down
2 changes: 2 additions & 0 deletions src/pregel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -817,6 +817,7 @@ impl<'a> Pregel<'a> {
.to_owned()
.alias(self.vertex_column.as_ref()), // initial message column name is set by the user
])
.with_streaming(true)
.collect()?;
// After computing the super-step 0, we start the execution of the Pregel algorithm. This
// execution is performed until all the nodes vote to halt, or the number of iterations is
Expand Down Expand Up @@ -911,6 +912,7 @@ impl<'a> Pregel<'a> {
col(Column::Id.as_ref()),
col(Column::Id.as_ref()),
)
.with_streaming(true)
.collect()?;

iteration += 1; // increment the counter so we now which iteration is being executed
Expand Down

0 comments on commit ca40f17

Please sign in to comment.