Spaces:
Running
Running
“Namhyun-Kim”
commited on
Commit
·
aadcfea
1
Parent(s):
3be3431
Fix SNR sorting init order
Browse files
app.py
CHANGED
|
@@ -723,6 +723,10 @@ TECH_EXPERT_ORDER = ["LTE", "WiFi", "5G"]
|
|
| 723 |
TECH_TO_EXPERT_IDX = {name: idx for idx, name in enumerate(TECH_EXPERT_ORDER)}
|
| 724 |
DEFAULT_TSNE_SAMPLES_PER_SNR = 500
|
| 725 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 726 |
default_tech = tech_choices[:1] if tech_choices else []
|
| 727 |
initial_spec_mod_choices = TECH_TO_MODS.get(default_tech[0], mod_choices) if default_tech else mod_choices
|
| 728 |
evaluation_disabled = (not has_moe_embeddings) or joint_eval_df.empty
|
|
|
|
| 723 |
TECH_TO_EXPERT_IDX = {name: idx for idx, name in enumerate(TECH_EXPERT_ORDER)}
|
| 724 |
DEFAULT_TSNE_SAMPLES_PER_SNR = 500
|
| 725 |
|
| 726 |
+
def _sort_snrs(labels: List[str] | np.ndarray) -> List[str]:
|
| 727 |
+
ordering = {snr: idx for idx, snr in enumerate(SNR_ORDER)}
|
| 728 |
+
return sorted(labels, key=lambda x: ordering.get(x, len(ordering)))
|
| 729 |
+
|
| 730 |
default_tech = tech_choices[:1] if tech_choices else []
|
| 731 |
initial_spec_mod_choices = TECH_TO_MODS.get(default_tech[0], mod_choices) if default_tech else mod_choices
|
| 732 |
evaluation_disabled = (not has_moe_embeddings) or joint_eval_df.empty
|