Skip to content

Commit c3c9a2e

Browse files
Make CKA coherence test opt-in (--run-cka replaces --skip-cka)
CKA requires multiple models with shared subjects and is not always applicable. Change from opt-out (--skip-cka) to opt-in (--run-cka) so it only runs when explicitly requested.
1 parent 3135812 commit c3c9a2e

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/generate_embeddings.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ def __init__(self):
426426
.add_flag("--verbose", "Enable verbose output.")
427427
.add_flag("--cpu", "Force CPU usage (disable CUDA).")
428428
.add_flag("--profiling", "Enable Python profiling (cProfile).")
429-
.add_flag("--skip-cka", "Skip CKA coherence test after embeddings.")
429+
.add_flag("--run-cka", "Run CKA coherence test after embeddings.")
430430
.add_flag("--no-cache", "Force re-extraction of archive (ignore cache).")
431431
.add_optional_argument(
432432
"--nb_jobs",
@@ -597,8 +597,8 @@ def _run_pipeline(self, local_dir):
597597

598598
result = self.execute_command(cmd, shell=False)
599599

600-
# Run CKA coherence test by default (skip if --skip-cka)
601-
if not self.args.skip_cka:
600+
# Run CKA coherence test only if explicitly requested
601+
if self.args.run_cka:
602602
self._run_cka_test()
603603

604604
os.chdir(local_dir)

tests/test_generate_embeddings.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def test_flags_default_to_false(self):
7171
assert args.verbose is False
7272
assert args.cpu is False
7373
assert args.profiling is False
74-
assert args.skip_cka is False
74+
assert args.run_cka is False
7575
assert args.no_cache is False
7676

7777
def test_flags_can_be_set(self):
@@ -85,7 +85,7 @@ def test_flags_can_be_set(self):
8585
"--verbose",
8686
"--cpu",
8787
"--profiling",
88-
"--skip-cka",
88+
"--run-cka",
8989
"--no-cache"
9090
])
9191
assert args.overwrite is True
@@ -94,7 +94,7 @@ def test_flags_can_be_set(self):
9494
assert args.verbose is True
9595
assert args.cpu is True
9696
assert args.profiling is True
97-
assert args.skip_cka is True
97+
assert args.run_cka is True
9898
assert args.no_cache is True
9999

100100
def test_nb_jobs_default_none(self):

0 commit comments

Comments
 (0)