Skip to content

Graph testing - #1426

Closed
Marsella8 wants to merge 7 commits into
flexflow:repo-refactorfrom
Marsella8:graph-testing
Closed

Graph testing#1426
Marsella8 wants to merge 7 commits into
flexflow:repo-refactorfrom
Marsella8:graph-testing

Conversation

@Marsella8

@Marsella8 Marsella8 commented Jun 26, 2024

Copy link
Copy Markdown
Contributor

Description of changes:

  • Added tests for di_graph

Related Issues:

Linked Issues:

Issues closed by this PR:

  • Closes #

This change is Reviewable

@Marsella8 Marsella8 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 0 of 2 files reviewed, 3 unresolved discussions


lib/utils/test/src/test_algorithms.cc line 111 at r1 (raw file):

  }

  TEST_CASE("OpenMultiDiGraph") {

Was working on this part before you told me to focus on DiGraph, will leave it commented in case we ever need it for the future.


lib/utils/test/src/test_digraph.cc line 9 at r1 (raw file):

TEST_SUITE(FF_TEST_SUITE) {
  TEST_CASE_TEMPLATE("DiGraph implementations", T, AdjacencyDiGraph) {

Currently, all the node queries are passing, while all the edge ones are failing. Unsure if it's because the tests are actually failing or because I'm improperly using the edges.


lib/utils/test/src/test_digraph.cc line 34 at r1 (raw file):

          std::unordered_set<Node>{n[0], n[2]});

    std::unordered_set<DirectedEdge> queried_edges =

Fails, all the directed edges are inverted. I've seen that in the codebase for Edge declaration sometimes src comes before dst, while some other times it comes after (eg for MultiDiEdges), possibly linked to that?

@codecov

codecov Bot commented Jun 26, 2024

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 39.28%. Comparing base (411bc12) to head (8b5179e).
Report is 15 commits behind head on repo-refactor.

Additional details and impacted files
@@                Coverage Diff                @@
##           repo-refactor    #1426      +/-   ##
=================================================
- Coverage          41.32%   39.28%   -2.05%     
=================================================
  Files                181      253      +72     
  Lines               5265     8859    +3594     
  Branches             271      324      +53     
=================================================
+ Hits                2176     3480    +1304     
- Misses              3089     5379    +2290     
Flag Coverage Δ
unittests 39.28% <ø> (-2.05%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

see 310 files with indirect coverage changes

@lockshaw

Copy link
Copy Markdown
Collaborator

lib/utils/test/src/test_digraph.cc line 34 at r1 (raw file):

Previously, Marsella8 wrote…

Fails, all the directed edges are inverted. I've seen that in the codebase for Edge declaration sometimes src comes before dst, while some other times it comes after (eg for MultiDiEdges), possibly linked to that?

Yes, it's likely exactly that reason. I have a fix for that on the dataflow-graph branch, will let you know when that's ready. If you'd like you can wait for that to merge (or at least be finished) before you continue with this

@Marsella8 Marsella8 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 0 of 2 files reviewed, 3 unresolved discussions (waiting on @lockshaw)


lib/utils/test/src/test_digraph.cc line 34 at r1 (raw file):

Previously, lockshaw (Colin Unger) wrote…

Yes, it's likely exactly that reason. I have a fix for that on the dataflow-graph branch, will let you know when that's ready. If you'd like you can wait for that to merge (or at least be finished) before you continue with this

Got it thanks, will wait for your branch and in the meanwhile will work on the other tests.

@Marsella8 Marsella8 closed this Aug 11, 2024
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.

2 participants