-
Notifications
You must be signed in to change notification settings - Fork 8
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
add MEModel #136
add MEModel #136
Conversation
Change-Id: I0ac683e488d7269ec67318aa64d9d57ca0a06ed0
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #136 +/- ##
==========================================
+ Coverage 60.07% 60.23% +0.15%
==========================================
Files 109 110 +1
Lines 7838 7841 +3
==========================================
+ Hits 4709 4723 +14
+ Misses 3129 3118 -11 ☔ View full report in Codecov by Sentry. |
Change-Id: I0048cc88c3295519dbb39f27fde512eafbe6862d
Change-Id: I4ff43ce5d81a8a0a6b0fee622b413929475a2392
… memodel Conflicts: bluepyemodel/validation/validation.py Change-Id: I2a6555a53a83c9bde8adaa0a67c782312ce76112
Change-Id: I55d6a2388fb3fce1e08f78b1149b2b0dc4c6f912
Change-Id: I1c0ca3a4a4396413418cab5e6efa4e7dac2c3e20
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just minor comments
bluepyemodel/tools/utils.py
Outdated
|
||
def get_checkpoint_path(metadata, seed=None): | ||
"""Get checkpoint path. Use legacy format if any is found, if not use latest format.""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"""Get checkpoint path. Use legacy format if any is found, if not use latest format.""" | |
"""Get checkpoint path. Use legacy format if any is found, else use latest format.""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed in latest commit
|
||
return checkpoint_metadata | ||
return int(seed) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I understand, if search_str
is not found in any filename then seed
will be None
and then int(None)
will raise an error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch! I changed default seed to be 0 if it is not found in the filename
metadata = EModelMetadata(emodel="L5PC", ttype="t type", iteration_tag="test") | ||
def checkpoint_check(dir, fname, metadata, inner_dir): | ||
f = dir / fname | ||
f.write_text("") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
f.write_text("") | |
f.touch() |
If I'm correct f
is a pathlib.Path
object, so you can use Path.touch()
to create an empty file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, changed in latest commit
Change-Id: Ic44a24779e836f1fd96862b5b7a9cd8604e5e59f
also small refactoring for
EModel
,search_pdfs
andvalidate
Also take into account all possible legacy checkpoint paths, that depend on
EModelMetadata.as_string()
, that has been updated several times