Skip to content

Hardcoded values

Every fixed value a replicator may need to change is marked in the code with # HARDCODED:. The table below is regenerated from those comments on every build, so it always matches the code; click a location to open it. To add a row, add a # HARDCODED: comment in the code.

Where What
kirad/augmentations.py:190 assumes 16 kHz audio; maxF=8000 is its Nyquist
kirad/base_models.py:93 above 10,000 scores, Sn/Sp thresholds use a 10,000-point linspace grid
kirad/base_models.py:103 0% / 40% indet budgets
kirad/base_models.py:194 per-window loss in train; loss of the per-recording mean in val/test
kirad/base_models.py:391 1000 interpolation points
kirad/base_models.py:849 English-only Whisper (DAM 1-3)
kirad/base_models.py:867 1500 encoder positions = 30 s of audio (Whisper default)
kirad/base_models.py:892 default model id
kirad/base_models.py:922 English BERT (DAM 2 text)
kirad/base_models.py:947 default model id
kirad/base_models.py:950 LLaMA truncated to its first 15 layers
kirad/constants.py:13 audio must already be 16 kHz; files are not resampled.
kirad/constants.py:21 VAD silence/speech minimums (ms); VAD itself runs upstream, not in this repo.
kirad/constants.py:36 questionnaire maxima; set the ordinal range of each task.
kirad/constants.py:40 binary cuts for metrics/thresholds; label counts cutoffs exceeded (strict >).
kirad/constants.py:42 CORAL target sets per task; exact28/exact22 use every score boundary.
kirad/constants.py:141 Kintsugi remote storage URIs, blanked to None in this copy.
kirad/constants.py:147 local cache under ~/.kintsugi and ~/.cache/kintsugi.
kirad/constants.py:170 fixed 80-bin log-mel mean profile; WhisperTorchFeatureExtractor shifts each
kirad/dataset_utils.py:118 audio files must be <filename>.wav, transcripts <filename>.json
kirad/dataset_utils.py:183 download via gsutil from a private GCS URI in constants.py
kirad/dataset_utils.py:490 10 random splits tried; the lowest-KL one is kept
kirad/dataset_utils.py:663 Kintsugi CSV schema; missing columns are skipped, new ones are ignored.
kirad/dataset_utils.py:691 columns kept as per-row lists after merging
kirad/dataset_utils.py:701 duration columns summed after merging
kirad/datasets_and_dataloaders.py:54 30 s windows (= Whisper input length); also the default min_duration filter
kirad/datasets_and_dataloaders.py:56 default overlap only for direct calls; datasets pass max_overlap_frac (0.0)
kirad/datasets_and_dataloaders.py:61 task -> CSV label column (depression = PHQ, anxiety = GAD)
kirad/datasets_and_dataloaders.py:259 random_state=1 for the fraction subsample
kirad/datasets_and_dataloaders.py:379 HF feature extractor name; mar_2024/config.yaml sets false (log-mel on GPU)
kirad/datasets_and_dataloaders.py:485 only channel 0 is used (stereo files lose the other channel)
kirad/datasets_and_dataloaders.py:545 tokenizer name (DAM 2 text branch); a W&B artifact URL is also accepted
kirad/feature_extraction_whisper.py:83 16 kHz input, mel filters up to 8 kHz (Whisper setup)
kirad/feature_extraction_whisper.py:90 fixed per-bin target energies from kirad/constants.py (80 values)
kirad/feature_extraction_whisper.py:132 Whisper's 8 (log10) = 80 dB dynamic range and (x + 4) / 4 scaling
kirad/launcher_utils.py:119 default seed
kirad/launcher_utils.py:120 default patience (validations)
kirad/launcher_utils.py:328 CuBLAS workspace setting required for deterministic GPU ops.
kirad/plotting.py:73 ROC budgets 0%..70%, step 10%
kirad/utils.py:206 URL layout host/entity/project/artifacts/type/name[/tag]; tag defaults to "best"
kirad/utils.py:340 looks for baseline_const_0..3 only (tasks with up to 4 classes)
kirad/utils.py:478 test scores are logged once, as version v0
kirad/utils.py:588 budgets 0%..90%
kirad/utils.py:600 task names; edit for other outcomes
scripts/launcher.py:88 DDP with find_unused_parameters=True; fp16 on GPU, fp32 on CPU.
scripts/launcher.py:171 W&B entity/project are None, so every run raises until you set them.
scripts/launcher.py:202 checkpoint root; /mnt/chkpts when JOB_NAME (Kubernetes) is set.
scripts/launcher.py:254 "kipy" is a private Kintsugi package; remove it if unavailable.
scripts/launcher.py:448 Kubernetes namespace "default".
scripts/launcher.py:476 DDP master port 12355.
scripts/run_whisper_asr.py:35 ASR model "large-v3"; reloaded on every call.
scripts/run_whisper_asr.py:65 English only; change for Congo/Colombia/Jordan/Ukraine data.
scripts/run_whisper_asr.py:70 decoding params (beam 5, best_of 5, temperature fallback).
research/stable/ordinal_regression_mtl_aug_2024/model.py:182 default indeterminate budgets 0% and 40%
research/stable/ordinal_regression_mtl_jun_2024/model.py:42 default indeterminate budgets 0% and 40%
research/stable/ordinal_regression_mtl_mar_2024/model.py:56 default indeterminate budgets 0% and 40%
research/stable/ordinal_regression_mtl_mar_2024/model.py:70 1500 encoder positions = 30 s windows (Whisper default)
research/stable/ordinal_regression_mtl_mar_2024/model.py:73 320 samples per encoder position (hop 160 x conv stride 2 at 16 kHz);

Move to YAML for the new countries

Value Now in Why it matters for Congo, Colombia, Jordan, Ukraine
ASR model and language="en" scripts/run_whisper_asr.py transcripts must be in French/Lingala, Spanish, Arabic, Ukrainian
Whisper openai/whisper-small.en WhisperBackbone, KintsugiAudioDataset defaults and every YAML English-only encoder; a multilingual checkpoint (e.g. whisper-small) is needed
BERT google-bert/bert-base-uncased BERTBackbone, KintsugiTextDataset defaults English tokenizer/model
IDEAL_LOGMEL_ENERGIES kirad/constants.py fixed log-mel profile of unknown origin (Kintsugi data); recompute per device/country or disable
METRIC_TARGET_CUTOFFS, MAX_SCORE kirad/constants.py local validated PHQ-9 / GAD-7 cutoffs may differ; SCID outcome needs its own entry
Task names ("anxiety", "depression") kirad/utils.py (indet_analysis; default of analyze_dataframe_with_scores) new outcomes are silently skipped in analysis
Merge columns (zip_code, english_preferred, …) merge_df_rows_by_subject US survey schema
EXPECTED_SAMPLE_RATE 16 kHz, no resampling kirad/constants.py field audio at 8/44.1/48 kHz must be resampled upstream
Indeterminate budgets (0.0, 0.4) model.py of each DAM already overridable per task (indet_budgets); keep explicit in YAML
W&B entity/project, kipy scripts/launcher.py must be set for any run