nouamanetazi HF Staff commited on
Commit
c96b379
·
1 Parent(s): 3f50411
Files changed (1) hide show
  1. app.py +12 -9
app.py CHANGED
@@ -44,10 +44,10 @@ def load_config_from_yaml_file(yaml_path):
44
  def format_config_display(config):
45
  if not config:
46
  return "No configuration loaded"
47
-
48
  sections = {
49
  "Model Architecture": [
50
- "hidden_size", "num_layers", "vocab_size",
51
  "intermediate_size", "tie_word_embeddings", "num_attention_heads", "num_key_value_heads"
52
  ],
53
  "Training Configuration": [
@@ -57,14 +57,17 @@ def format_config_display(config):
57
  "tp", "pp", "dp", "zero_stage"
58
  ]
59
  }
60
-
61
- output = []
62
- for section, params in sections.items():
63
- output.append(f"\n### {section}")
64
  for param in params:
65
- output.append(f"- {param}: {config[param]}")
66
-
67
- return "\n".join(output)
 
 
 
68
 
69
  def process_yaml_and_plot(config):
70
  if not config:
 
44
  def format_config_display(config):
45
  if not config:
46
  return "No configuration loaded"
47
+
48
  sections = {
49
  "Model Architecture": [
50
+ "hidden_size", "num_layers", "vocab_size",
51
  "intermediate_size", "tie_word_embeddings", "num_attention_heads", "num_key_value_heads"
52
  ],
53
  "Training Configuration": [
 
57
  "tp", "pp", "dp", "zero_stage"
58
  ]
59
  }
60
+
61
+ output = "<div style='display: flex;'>"
62
+ for section_name, params in sections.items():
63
+ output += f"<div style='flex: 1; padding-right: 20px;'><h3>{section_name}</h3>"
64
  for param in params:
65
+ value = config.get(param, 'N/A')
66
+ output += f"<b>{param}</b>: {value}<br>"
67
+ output += "</div>"
68
+ output += "</div>"
69
+ return output
70
+
71
 
72
  def process_yaml_and_plot(config):
73
  if not config: