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

Improve repair #65

Merged
merged 1 commit into from
Mar 31, 2021
Merged

Improve repair #65

merged 1 commit into from
Mar 31, 2021

Conversation

arnaudon
Copy link
Contributor

@arnaudon arnaudon commented Mar 11, 2021

Work PR to improve repair algorithm. Current modifications:

  • better handling of diameters with global taper rates
  • simplified handling of diameters at bifurcations
  • improved soma_repulsion factor
  • remove bifurcation boosting
  • added parameters in a dict to access them upon execution
  • move all logging to debug from warning (they are only useful for debug really, they just fill up the logs otherwise)

@arnaudon arnaudon marked this pull request as draft March 11, 2021 14:49
@arnaudon arnaudon force-pushed the improve_repair branch 5 times, most recently from 9d3c7d8 to c7fc832 Compare March 12, 2021 14:49
@arnaudon arnaudon marked this pull request as ready for review March 12, 2021 14:59
@arnaudon
Copy link
Contributor Author

@wizmer , good to review. Once we agree on the code, I'll update the tests. They may change a bit if we change things.

@arnaudon
Copy link
Contributor Author

@asanin-epfl @adrien-berchet , you can now review this! Thanks!

neuror/cut_plane/cut_leaves.py Show resolved Hide resolved
neuror/main.py Outdated Show resolved Hide resolved
neuror/main.py Outdated Show resolved Hide resolved
neuror/main.py Show resolved Hide resolved
@@ -147,27 +150,6 @@ def _last_segment_vector(section, normalized=False):
return vec


def _get_similar_child_diameters(sections, original_section):
Copy link
Contributor

Choose a reason for hiding this comment

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

I hope it's been validated against repair-workflow.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

nope, I will have to pin the neuror version in repair-workflow for the time being. But MCAR (the newest workflow) will do the same, so it will be duplicated calls to repair. Because of all the new parameters we can access now, I will only maintain MCAR (in cells/morphology-processing-workflow).

Copy link
Contributor

Choose a reason for hiding this comment

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

What is used for the release of morphologies? MCAR or repair-workflow? If we merge this, and repair-workflow fails, what to do then? This can't be patched at the level of repair-workflow. Pinning of NeuroR is a shaky solution. If any patch comes to NeuroR later, how to apply it? The version is pinned.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, we need to be careful here. I will run tests of morphology-repair-workflow to be sure the damage is not too big. This particular function I removed as I don't use it internally, but it will not be visible from outisde. This function was not doing the correct thing with diameters. We know diameters should decrease, and this function my not respect it. It is function benoit copied from a very old code, but I worked on diameters quite a lot, and we can do better than that.

Copy link
Contributor

Choose a reason for hiding this comment

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

It is function benoit copied from a very old code, but I worked on diameters quite a lot, and we can do better than that.

It's not about being better. The main problem is compatibility with legacy. From what I understood, we must reproduce the same results as the old code. That is why there is such arguments as legacy_detection etc.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

if you really don't want to merge it here, I'll copy this code over to mine.

Copy link
Contributor

Choose a reason for hiding this comment

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

Benoit's version was legacy, and it was ok.

From what I understand there are 2 legacy versions. The first is when Benoit rewrote for the first time. The second is when it turned out that the first produces different results than the original legacy by RepairSDK.

if you really don't want to merge it here

It's not about mine desire. It's about we don't break repair-workflow. If you don't use it for release of morphologies then I'm ok.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I know your point. The legacy version is for cut plane, not for this repair function. We can wait the merge until I have compared results with previous version and morphometric on the tickets. I wanted to do that but neurom didn't... Now you have merge the other 2 PR, I'll retry!

Copy link
Contributor

Choose a reason for hiding this comment

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

Thank you. As soon as you confirm repair-workflow, we can merge here.

P.S. CI is still required.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

CI is driving me crazy!

neuror/main.py Outdated Show resolved Hide resolved
neuror/main.py Show resolved Hide resolved
neuror/main.py Outdated Show resolved Hide resolved
neuror/main.py Outdated Show resolved Hide resolved
neuror/main.py Outdated Show resolved Hide resolved
neuror/main.py Outdated Show resolved Hide resolved
neuror/main.py Outdated Show resolved Hide resolved
neuror/cut_plane/cut_leaves.py Show resolved Hide resolved
@arnaudon
Copy link
Contributor Author

Thanks for squashing all this mess, Adrien!

@asanin-epfl asanin-epfl merged commit 88d6b2c into BlueBrain:master Mar 31, 2021
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.

3 participants