Skip to content

Comet: Undocumented and incorrectly described function #20583

@IanMaquignaz

Description

@IanMaquignaz

The Comet function log_model has no formal documentation and what little is written is wrong. None of the Comet examples include this function.

See logger.experiment.log_model(name="my-model", "path to your model")

The correct function definition:

logger.experiment.log_model(name="my-model", file_or_folder="<path to your model>")

A working example

Assuming Trainer enable_checkpointing is True:

class DNN(pl.LightningModule):
     def __init__(self):
          ...
     on_train_end(self):
          self.logger.experiment.log_model(
               name="<SomeModelName>",
               file_or_folder=self.trainer.checkpoint_callback.last_model_path,
          )

cc @lantiga @Borda

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions