Skip to content

Commit

Permalink
[Keras Mixin] Rendering the Hyperparameter table vertically (#917)
Browse files Browse the repository at this point in the history
* chor: applying black

* chore: removing a preceeding space
  • Loading branch information
ariG23498 authored Jun 22, 2022
1 parent 80d4a9e commit 8084e62
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions src/huggingface_hub/keras_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,9 @@ def _create_hyperparameter_table(model):
optimizer_params[
"training_precision"
] = tf.keras.mixed_precision.global_policy().name
table = "|"
for key in optimizer_params.keys():
table += f" {key} |"

table += "\n|"
for key in optimizer_params.keys():
table += "-" * len(key)
table += "|"

table += "\n|"
for key in optimizer_params.keys():
table += f"{optimizer_params[key]}|"
table = "| Hyperparameters | Value |\n| :-- | :-- |\n"
for key, value in optimizer_params.items():
table += f"| {key} | {value} |\n"
else:
table = None
return table
Expand Down

0 comments on commit 8084e62

Please sign in to comment.