Skip to content

Commit

Permalink
Fix incorrect logger calls (#1186)
Browse files Browse the repository at this point in the history
  • Loading branch information
prathapsridharan authored Jun 5, 2024
1 parent 5ac71a4 commit 75fa725
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ def get_obs_and_var(
obs_column_names=CXG_OBS_COLUMNS_READ,
var_column_names=CXG_VAR_COLUMNS_READ,
) as adata:
logging.debug(f"{dataset.dataset_id}/{spec.name} - found {adata.n_obs} cells")
logger.debug(f"{dataset.dataset_id}/{spec.name} - found {adata.n_obs} cells")

# Skip this dataset if there are not cells after filtering
if adata.n_obs == 0:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1111,7 +1111,7 @@ def validate(args: CensusBuildArgs) -> int:
with create_dask_client(args, n_workers=n_workers, threads_per_worker=1, memory_limit=None) as client:
assert all(r.result() for r in distributed.wait(validate_soma(args, client)).done)
shutdown_dask_cluster(client)
logging.info("Validation complete.")
logger.info("Validation complete.")

assert validate_consolidation(args)
logger.info("Validating correct consolidation and vacuuming - complete")
Expand Down
2 changes: 1 addition & 1 deletion tools/census_contrib/src/census_contrib/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ def load_qc_anndata(

def create_qc_plots(config: Config, embedding: Path) -> None:
if config.metadata.data_type == "var_embedding":
logging.info("Skipping QC plots for var embedding")
logger.info("Skipping QC plots for var embedding")
return

sc._settings.settings.autoshow = False
Expand Down
18 changes: 9 additions & 9 deletions tools/perf_checker/perf_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,18 @@ def format_string(text: str) -> Any:
formatted_first_profile = json.dumps(format_string(str(attr.asdict(first_profile))))
formatted_curr_profile = json.dumps(format_string(str(attr.asdict(curr_profile))))

logging.info("****************************")
logging.info(f"Current time {curr_time} vs first time {first_time}")
logging.info("****************************")
logging.info(f"First profile: {formatted_first_profile}")
logging.info("****************************")
logging.info(f"Current profile: {formatted_curr_profile}")
logging.info("****************************")
logging.info(
logger.info("****************************")
logger.info(f"Current time {curr_time} vs first time {first_time}")
logger.info("****************************")
logger.info(f"First profile: {formatted_first_profile}")
logger.info("****************************")
logger.info(f"Current profile: {formatted_curr_profile}")
logger.info("****************************")
logger.info(
f"TileDB version ver = first: {first_profile.tiledbsoma_version} curr: {curr_profile.tiledbsoma_version}"
)
if float(curr_time) > threshold * float(first_time):
raise SystemExit(f"Major performance degradation detected on {args.command}")

if threshold * float(curr_time) < float(first_time):
logging.info(f"Major performance increase detected on {args.command}")
logger.info(f"Major performance increase detected on {args.command}")

0 comments on commit 75fa725

Please sign in to comment.