Skip to content
Snippets Groups Projects
Commit 0988e735 authored by Yannick DAYER's avatar Yannick DAYER
Browse files

Merge branch 'norm-stats' into 'master'

Fixed issue with score normalization with dev/eval groups

See merge request !301
parents 5e97e3d9 74d3b9ef
No related branches found
No related tags found
1 merge request!301Fixed issue with score normalization with dev/eval groups
Pipeline #63214 passed
...@@ -337,15 +337,18 @@ def execute_pipeline_score_norm( ...@@ -337,15 +337,18 @@ def execute_pipeline_score_norm(
) )
if checkpoint and not is_biopipeline_checkpointed(post_processor): if checkpoint and not is_biopipeline_checkpointed(post_processor):
model_path = os.path.join( score_stats_path = os.path.join(
checkpoint_dir, checkpoint_dir,
f"{score_normalization_type}-scores", f"{score_normalization_type}-scores",
"norm", "norm",
"stats.pkl", "stats",
) )
# we cannot checkpoint "features" because sample.keys are not unique. # we cannot checkpoint "features" because sample.keys are not unique.
post_processor = wrap( post_processor = wrap(
["checkpoint"], post_processor, model_path=model_path, force=force ["checkpoint"],
post_processor,
model_path=score_stats_path,
force=force,
) )
pipeline = PipelineScoreNorm(pipeline, post_processor) pipeline = PipelineScoreNorm(pipeline, post_processor)
...@@ -355,6 +358,10 @@ def execute_pipeline_score_norm( ...@@ -355,6 +358,10 @@ def execute_pipeline_score_norm(
# treferences = database.treferences(proportion=ztnorm_cohort_proportion) # treferences = database.treferences(proportion=ztnorm_cohort_proportion)
for group in groups: for group in groups:
# Changing the score normalization stats file name as a function of the group
if checkpoint and not is_biopipeline_checkpointed(post_processor):
post_processor.model_path = f"{score_stats_path}_{group}.pkl"
if score_normalization_type == "znorm": if score_normalization_type == "znorm":
score_normalization_samples = database.zprobes(group=group) score_normalization_samples = database.zprobes(group=group)
elif score_normalization_type == "tnorm": elif score_normalization_type == "tnorm":
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment