Closed
Conversation
… label insted of all generated subgraphs
…on-canonical subgraphs
…e labelg path based on the platform
Improve ESU execution time
This adds tests for exampleGraph and random graph generation. I modified random graph generation slightly to make it easier to test - we might be better off removing the "mimic graph" parameter entirely and just specifying the exact properties of the graph we want.
Add snapshot tests
format all files with black
Using ./NetMotif for all paths required always running the server from outside its root directory, and required that it always lived inside a directory called "NetMotif". Both requirements make development and deployment a bit awkward, but we can fix it by always taking paths relative to one of our source files (which should be constant).
This was causing a warning from streamlit, where mixed types ("NA" and
floats) worked, but weren't meant to be used. I also noticed the
four-decimal formatting was done by streamlit and not written down
anywhere, so I added it here explicitly.
Streamlit was giving a warning about the blank label (and there really should be one for accessibility anyway).
This creates a labelg process and worker thread, which receive (non canonical label, extra data), send it to labelg in batches, and run a callback function when the canonical label is available. This is opposed to the previous method, which required all data to be available upfront and ran labelg at the end. This will help the SubgraphProfile and SubgraphCollection implementations. In particular, if we end up doing a streaming implementation, we'll need labelg to be streaming as well, otherwise we'd need to keep all of the node data in memory until ESU is done, then run labelg in one pass. Technically, this allows labelg to run in parallel with ESU, although labelg is so fast that this doesn't improve performance. I ran a few tests and don't see any difference in performance between this and the old version. I also added a few controls (batch size and max batches), but I haven't tuned them.
Uellenberg/current version parity
allow 0 random graphs
remove the unused ESU progress param
… the temporarly created files
Implement SubgraphProfile and SubgraphCollection dwnload
This is based on FANMOD's sampling mode, and allows us to get good results at a fraction of the time a full ESU takes. It works by probabilistically determining whether to explore certain branches of the graph. I didn't add weighting because it always cancels out in our case. If it needs to be added in the future, the weight is 1/(product of all probabilities). For the probabilities themselves, the formula I used is a bit arbitrary, it's just one that scales with the depth (we don't want to take out too many of the early paths) and has nice probabilities. There's probably a more optimal formula to use, or we may allow users to input their own probabilities by hand.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.