Added doc strings for Comet logger (#9114)

This commit is contained in:
Burhanuddin Rangwala 2021-08-26 16:31:46 +05:30 committed by GitHub
parent 8efdeb2c00
commit 0752bcd0eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 25 additions and 0 deletions

View File

@ -268,10 +268,22 @@ class CometLogger(LightningLoggerBase):
@property
def save_dir(self) -> Optional[str]:
"""
Gets the save directory.
Returns:
The path to the save directory.
"""
return self._save_dir
@property
def name(self) -> str:
"""
Gets the project name.
Returns:
The project name if it is specified, else "comet-default".
"""
# Don't create an experiment if we don't have one
if self._experiment is not None and self._experiment.project_name is not None:
return self._experiment.project_name
@ -283,6 +295,19 @@ class CometLogger(LightningLoggerBase):
@property
def version(self) -> str:
"""
Gets the version.
Returns:
The first one of the following that is set in the following order
1. experiment id.
2. experiment key.
3. "COMET_EXPERIMENT_KEY" environment variable.
4. future experiment key.
If none are present generates a new guid.
"""
# Don't create an experiment if we don't have one
if self._experiment is not None:
return self._experiment.id