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

[BBPBGLIB-1057] Replace Report.hoc by report.py #145

Merged
merged 11 commits into from
Apr 17, 2024

Conversation

jorblancoa
Copy link
Collaborator

@jorblancoa jorblancoa commented Mar 20, 2024

Context

Create a python report.py and replace the old Report.hoc

Review

  • PR description is complete
  • Coding style (imports, function length, New functions, classes or files) are good
  • Unit/Scientific test added
  • Updated Readme, in-code, developer documentation

@bbpbuildbot

This comment has been minimized.

@bbpbuildbot

This comment has been minimized.

@bbpbuildbot

This comment has been minimized.

@bbpbuildbot

This comment has been minimized.

@bbpbuildbot

This comment has been minimized.

Copy link
Member

@matz-e matz-e left a comment

Choose a reason for hiding this comment

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

The less HOC the better 🥳

neurodamus/node.py Outdated Show resolved Hide resolved
neurodamus/node.py Outdated Show resolved Hide resolved
neurodamus/node.py Outdated Show resolved Hide resolved
neurodamus/node.py Show resolved Hide resolved
neurodamus/report.py Outdated Show resolved Hide resolved
@bbpbuildbot

This comment has been minimized.

@bbpbuildbot

This comment has been minimized.

@bbpbuildbot

This comment has been minimized.

@jorblancoa jorblancoa force-pushed the jblanco/report_refactor branch from ea1e422 to 2296f55 Compare March 26, 2024 10:30
@jorblancoa jorblancoa marked this pull request as ready for review March 26, 2024 10:30
@bbpbuildbot

This comment has been minimized.

@jorblancoa jorblancoa force-pushed the jblanco/report_refactor branch from 2296f55 to f11bdc4 Compare March 26, 2024 16:00
@bbpbuildbot

This comment has been minimized.

@bbpbuildbot

This comment has been minimized.

matz-e
matz-e previously approved these changes Mar 28, 2024
neurodamus/target_manager.py Show resolved Hide resolved
@ferdonline
Copy link
Collaborator

Great change! My only slight concern is regarding performance since reports can demanding as they go through all sections and hoc can use optimized 'for' loops, like forsec. I know it's tedious, but could you have maybe a simple time measurement, showing that we don't have a regression in terms of report setting-up time?

@jorblancoa
Copy link
Collaborator Author

Great change! My only slight concern is regarding performance since reports can demanding as they go through all sections and hoc can use optimized 'for' loops, like forsec. I know it's tedious, but could you have maybe a simple time measurement, showing that we don't have a regression in terms of report setting-up time?

Actually we have the times of the report setup time. It is true that is slower, but do we care that much? it is usually insignificant compared to the run time.

I checked the blueconfigs sonataconf-quick-v5-plasticity that has 5 reports, and run a simulation for 10ms and changed the target to Mosaic (~220k cells and 110 gids per rank), so this is almost worst case scenario (short simulation with a lot of reports and big number of gids per rank).

The hoc version:

[INFO] +================================================ TIMEIT STATS =================================================+
[INFO] |                       Event Label                        | Avg.Time | Min.Time | Max.Time | Hits R0 / Total   |
[INFO] +---------------------------------------------------------------------------------------------------------------+
[INFO] | Compute LB                                               |     0.02 |     0.01 |     0.03 |       1 / 2.00K   |
[INFO] | Cell creation                                            |    44.23 |    44.23 |    44.23 |       1 / 2.00K   |
[INFO] | Synapse creation                                         |    43.57 |    43.57 |    43.57 |       1 / 2.00K   |
[INFO] | Replay init                                              |     0.05 |     0.03 |     0.06 |       3 / 6.00K   |
[INFO] | Replay inject                                            |     0.16 |     0.14 |     0.17 |       1 / 2.00K   |
[INFO] | Enable Stimulus                                          |     1.16 |     1.12 |     1.68 |       1 / 2.00K   |
[INFO] | Enable Modifications                                     |     0.00 |     0.00 |     0.00 |       1 / 2.00K   |
[INFO] | Enable Reports                                           |    18.81 |    18.59 |    19.03 |       1 / 2.00K   |
[INFO] | Model Finalized                                          |    14.30 |    14.30 |    14.30 |       1 / 2.00K   |
[INFO] |  ╚ stdinit                                               |    14.25 |    14.25 |    14.25 |       1 / 2.00K   |
[INFO] | finished Run                                             |   148.49 |   148.49 |   148.49 |       1 / 2.00K   |
[INFO] |  ╚ psolve                                                |   146.57 |   146.57 |   146.60 |       1 / 2.00K   |
[INFO] +---------------------------------------------------------------------------------------------------------------+

And the python version:

[INFO] +================================================ TIMEIT STATS =================================================+
[INFO] |                       Event Label                        | Avg.Time | Min.Time | Max.Time | Hits R0 / Total   |
[INFO] +---------------------------------------------------------------------------------------------------------------+
[INFO] | Compute LB                                               |     0.02 |     0.01 |     0.03 |       1 / 2.00K   |
[INFO] | Cell creation                                            |    44.52 |    44.52 |    44.52 |       1 / 2.00K   |
[INFO] | Synapse creation                                         |    40.99 |    40.99 |    40.99 |       1 / 2.00K   |
[INFO] | Replay init                                              |     0.04 |     0.03 |     0.05 |       3 / 6.00K   |
[INFO] | Replay inject                                            |     0.16 |     0.15 |     0.18 |       1 / 2.00K   |
[INFO] | Enable Stimulus                                          |     1.16 |     1.12 |     1.58 |       1 / 2.00K   |
[INFO] | Enable Modifications                                     |     0.00 |     0.00 |     0.00 |       1 / 2.00K   |
[INFO] | Enable Reports                                           |    31.88 |    31.64 |    32.09 |       1 / 2.00K   |
[INFO] | Model Finalized                                          |    13.75 |    13.75 |    13.75 |       1 / 2.00K   |
[INFO] |  ╚ stdinit                                               |    13.71 |    13.71 |    13.71 |       1 / 2.00K   |
[INFO] | finished Run                                             |   144.41 |   144.41 |   144.41 |       1 / 2.00K   |
[INFO] |  ╚ psolve                                                |   143.83 |   143.83 |   143.85 |       1 / 2.00K   |
[INFO] +---------------------------------------------------------------------------------------------------------------+

What do you think?

@ferdonline
Copy link
Collaborator

Thanks for the measurements. I think that's acceptable given the benefit. 👍

WeinaJi
WeinaJi previously approved these changes Apr 9, 2024
@bbpbuildbot

This comment has been minimized.

WeinaJi
WeinaJi previously approved these changes Apr 9, 2024
@jorblancoa jorblancoa force-pushed the jblanco/report_refactor branch from a5b4db1 to 26b62e6 Compare April 9, 2024 15:12
@bbpbuildbot

This comment has been minimized.

@bbpbuildbot

This comment has been minimized.

@bbpbuildbot

This comment has been minimized.

@jorblancoa jorblancoa force-pushed the jblanco/report_refactor branch from a9f23d5 to 45bbbbe Compare April 9, 2024 20:57
@bbpbuildbot

This comment has been minimized.

@jorblancoa jorblancoa force-pushed the jblanco/report_refactor branch from 45bbbbe to 7bbf3cc Compare April 16, 2024 13:02
@bbpbuildbot
Copy link

@jorblancoa jorblancoa merged commit 3c1f9cc into main Apr 17, 2024
6 checks passed
@jorblancoa jorblancoa deleted the jblanco/report_refactor branch April 17, 2024 09:23
atemerev pushed a commit that referenced this pull request May 24, 2024
## Context
Create a python report.py and replace the old Report.hoc

## Review
* [x] PR description is complete
* [x] Coding style (imports, function length, New functions, classes or
files) are good
* [x] Unit/Scientific test added
* [ ] Updated Readme, in-code, developer documentation
WeinaJi pushed a commit that referenced this pull request Oct 14, 2024
## Context
Create a python report.py and replace the old Report.hoc

## Review
* [x] PR description is complete
* [x] Coding style (imports, function length, New functions, classes or
files) are good
* [x] Unit/Scientific test added
* [ ] Updated Readme, in-code, developer documentation
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.

5 participants