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

Fix incorrect logger calls #1186

Merged
merged 1 commit into from
Jun 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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}")
Loading