Skip to content

Commit

Permalink
add thread tracking
Browse files Browse the repository at this point in the history
  • Loading branch information
gordonkoehn committed Oct 15, 2024
1 parent 3c5a732 commit 3dc7b09
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lollipop/cli/deconvolute.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import pandas as pd
import numpy as np
from tqdm import tqdm, trange
from threadpoolctl import threadpool_info, ThreadpoolController

import lollipop as ll

Expand Down Expand Up @@ -242,7 +243,11 @@ def _deconvolute_bootstrap(
confint=confint(**confint_params),
**weights,
)

logging.warning(threadpool_info())

t_kdec = t_kdec.deconv_all(**deconv_params)

if have_confint:
# with conf int
res = t_kdec.fitted.copy()
Expand Down Expand Up @@ -389,6 +394,10 @@ def deconvolute(
tally_data,
namefield,
):

controller = ThreadpoolController()
logging.warning(f"Controller {controller.info()}")

# load data
yaml = ruamel.yaml.YAML(typ="rt")
print("load data")
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ strictyaml = { version = ">=1.7", optional = true }
tqdm = { version = ">=4.64", optional = true }
click = { version = "^8.0", optional = true }
click-option-group = { version = "^0.5", optional = true }
threadpoolctl = "^3.5.0"

[tool.poetry.extras]
cli = [ "zstandard", "ruamel.yaml", "strictyaml", "tqdm", "click", "click-option-group" ]
Expand Down

0 comments on commit 3dc7b09

Please sign in to comment.