Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

248 inconsistency between edgepopulationiter connections and edgesiter connections #249

Conversation

edasubert
Copy link
Contributor

No description provided.

@edasubert edasubert self-assigned this Nov 28, 2023
@edasubert edasubert marked this pull request as ready for review November 28, 2023 10:24
bluepysnap/edges/edge_population.py Outdated Show resolved Hide resolved
bluepysnap/edges/edges.py Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Dec 1, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (c9162f7) 100.00% compared to head (9cd14bc) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #249   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           32        32           
  Lines         2728      2706   -22     
=========================================
- Hits          2728      2706   -22     
Flag Coverage Δ
pytest 100.00% <100.00%> (ø)

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@joni-herttuainen
Copy link
Contributor

pinged @GianlucaFicarelli for an extra pair of eyes

Copy link
Contributor

@joni-herttuainen joni-herttuainen left a comment

Choose a reason for hiding this comment

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

LGTM. Let's discuss the versioning on stand-up on Monday. Otherwise, I'm ready to approve.

CHANGELOG.rst Outdated Show resolved Hide resolved
CHANGELOG.rst Outdated Show resolved Hide resolved
bluepysnap/edges/edge_population.py Outdated Show resolved Hide resolved
bluepysnap/edges/edge_population.py Outdated Show resolved Hide resolved
@GianlucaFicarelli
Copy link
Contributor

LGTM, but before merging, the version 2.1.0 should be released, unless all the new changes are going to be released together in 3.0.0 (but in this case, the changelog should be updated).

Side note, I don't remember if it was discussed if these changes can affect the performance of iter_connections(), and at what degree.

@edasubert
Copy link
Contributor Author

Using the same circuit ("/gpfs/bbp.cscs.ch/project/proj30/home/subert/tickets/NSETM-2250-test-psp/sonata/circuit_sonata.json")

on current master:

In [3]: len(list(circuit.edges["thalamus_neurons__thalamus_neurons__chemical"].iter_connections("bAC_IN")))
Out[3]: 104521

In [4]: %timeit len(list(circuit.edges["thalamus_neurons__thalamus_neurons__chemical"].iter_connections("bAC_IN")))
1.93 s ± 4.07 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)

In [5]: %timeit len(list(circuit.edges["thalamus_neurons__thalamus_neurons__chemical"].iter_connections("bAC_IN")))
1.92 s ± 8.32 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)

In [6]: %timeit len(list(circuit.edges["thalamus_neurons__thalamus_neurons__chemical"].iter_connections("bAC_IN")))
1.85 s ± 57.3 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)

In [7]: list(circuit.edges["thalamus_neurons__thalamus_neurons__chemical"].iter_connections("bAC_IN"))[:5]
Out[7]: [(14123, 5018), (14123, 5025), (14123, 5026), (14123, 5031), (14123, 5048)]

on this branch:

In [3]: len(list(circuit.edges["thalamus_neurons__thalamus_neurons__chemical"].iter_connections("bAC_IN")))
Out[3]: 104521

In [4]: %timeit len(list(circuit.edges["thalamus_neurons__thalamus_neurons__chemical"].iter_connections("bAC_IN")))
1.9 s ± 1.8 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)

In [5]: %timeit len(list(circuit.edges["thalamus_neurons__thalamus_neurons__chemical"].iter_connections("bAC_IN")))
1.89 s ± 1.44 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)

In [6]: %timeit len(list(circuit.edges["thalamus_neurons__thalamus_neurons__chemical"].iter_connections("bAC_IN")))
1.89 s ± 1.01 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)

In [7]: list(circuit.edges["thalamus_neurons__thalamus_neurons__chemical"].iter_connections("bAC_IN"))[:5]
Out[7]: 
[(CircuitNodeId(population='thalamus_neurons', id=14123),
  CircuitNodeId(population='thalamus_neurons', id=5018)),
 (CircuitNodeId(population='thalamus_neurons', id=14123),
  CircuitNodeId(population='thalamus_neurons', id=5025)),
 (CircuitNodeId(population='thalamus_neurons', id=14123),
  CircuitNodeId(population='thalamus_neurons', id=5026)),
 (CircuitNodeId(population='thalamus_neurons', id=14123),
  CircuitNodeId(population='thalamus_neurons', id=5031)),
 (CircuitNodeId(population='thalamus_neurons', id=14123),
  CircuitNodeId(population='thalamus_neurons', id=5048))]

@edasubert
Copy link
Contributor Author

this MR is now blocking my psp-validation upgrade, which is my fault, because I forgot about it, but still it would help me if we could merge this 🙂

@joni-herttuainen
Copy link
Contributor

joni-herttuainen commented Jan 30, 2024

I'm fine going all the way to 3.0.0 without releasing 2.1.0. AAMOF, since we are going to break stuff, I might just change that deprecated validate to completely removed validate -> validate-simulation + validate-circuit.

That being said, I have no issues with the PR, provided CHANGELOG is modified accordingly.

edasubert and others added 2 commits January 30, 2024 15:40
…etween-edgepopulationiter_connections-and-edgesiter_connections
changelog tuning
@edasubert edasubert merged commit dea9ac5 into master Jan 31, 2024
4 checks passed
@edasubert edasubert deleted the 248-inconsistency-between-edgepopulationiter_connections-and-edgesiter_connections branch January 31, 2024 13:30
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.

inconsistency between EdgePopulation.iter_connections and Edges.iter_connections
4 participants