Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
alibylite
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Swain Lab
aliby
alibylite
Commits
e232d427
Commit
e232d427
authored
3 years ago
by
Alán Muñoz
Browse files
Options
Downloads
Patches
Plain Diff
add logging img fetch time
parent
877b633a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
aliby/baby_client.py
+7
-0
7 additions, 0 deletions
aliby/baby_client.py
with
7 additions
and
0 deletions
aliby/baby_client.py
+
7
−
0
View file @
e232d427
...
...
@@ -4,6 +4,7 @@ import json
import
time
from
pathlib
import
Path
from
typing
import
Iterable
from
time
import
perf_counter
import
h5py
import
numpy
as
np
...
...
@@ -24,6 +25,8 @@ from requests_toolbelt.multipart.encoder import MultipartEncoder
from
agora.io.utils
import
Cache
,
accumulate
,
get_store_path
import
logging
################### Dask Methods ################################
def
format_segmentation
(
segmentation
,
tp
):
"""
Format a single timepoint into a dictionary.
...
...
@@ -141,10 +144,14 @@ class BabyRunner:
def
run_tp
(
self
,
tp
,
with_edgemasks
=
True
,
assign_mothers
=
True
,
**
kwargs
):
"""
Simulating processing time with sleep
"""
# Access the image
t
=
perf_counter
()
img
=
self
.
get_data
(
tp
)
logging
.
debug
(
f
"
Timing:BF_fetch:
{
perf_counter
()
-
t
}
s
"
)
t
=
perf_counter
()
segmentation
=
self
.
crawler
.
step
(
img
,
with_edgemasks
=
with_edgemasks
,
assign_mothers
=
assign_mothers
,
**
kwargs
)
logging
.
debug
(
f
"
Timing:crawler_step:
{
perf_counter
()
-
t
}
s
"
)
return
format_segmentation
(
segmentation
,
tp
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment