Transformer experiment logs (#130)

This commit is contained in:
Varuna Jayasiri
2022-06-27 14:11:44 +05:30
committed by GitHub
parent f7262109c6
commit e09ee89f36
12 changed files with 383 additions and 372 deletions

View File

@ -108,6 +108,7 @@ class NLPAutoRegressionConfigs(TrainValidConfigs):
# Set tracker configurations
tracker.set_scalar("accuracy.*", True)
tracker.set_scalar("loss.*", True)
tracker.set_text("sampled", False)
# Add a hook to log module outputs
hook_model_outputs(self.mode, self.model, 'model')
# Add accuracy as a state module.
@ -192,6 +193,7 @@ class NLPAutoRegressionConfigs(TrainValidConfigs):
# Add the prediction for logging
log += [(self.prompt_separator + self.text.itos[output[-1]], Text.value)]
tracker.add({'sampled': prompt})
# Print the sampled output
logger.log(log)

View File

@ -52,7 +52,11 @@
},
{
"cell_type": "markdown",
"metadata": {},
"metadata": {
"pycharm": {
"name": "#%% md\n"
}
},
"source": [
"### Enable [Comet](https://www.comet.ml)"
]
@ -60,7 +64,11 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"pycharm": {
"name": "#%%\n"
}
},
"outputs": [],
"source": [
"#@markdown Select in order to enable logging this experiment to [Comet](https://www.comet.ml).\n",
@ -317,4 +325,4 @@
},
"nbformat": 4,
"nbformat_minor": 4
}
}