Skip to content

Commit

Permalink
Remove deprecated rest_api_key parameter from Comet Logger
Browse files Browse the repository at this point in the history
The rest_api_key was only used for creating a Comet API object previously used
to compute the Logger version based on the number but this was cleaned by Lightning-AI#585
and the code was likely left there.
  • Loading branch information
Lothiraldan committed Jul 8, 2020
1 parent e0c7a15 commit 0fd3299
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions pytorch_lightning/loggers/comet.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ class CometLogger(LightningLoggerBase):
... workspace=os.environ.get('COMET_WORKSPACE'), # Optional
... save_dir='.', # Optional
... project_name='default_project', # Optional
... rest_api_key=os.environ.get('COMET_REST_API_KEY'), # Optional
... experiment_name='default' # Optional
... )
>>> trainer = Trainer(logger=comet_logger)
Expand All @@ -71,7 +70,6 @@ class CometLogger(LightningLoggerBase):
... save_dir='.',
... workspace=os.environ.get('COMET_WORKSPACE'), # Optional
... project_name='default_project', # Optional
... rest_api_key=os.environ.get('COMET_REST_API_KEY'), # Optional
... experiment_name='default' # Optional
... )
>>> trainer = Trainer(logger=comet_logger)
Expand All @@ -83,8 +81,7 @@ class CometLogger(LightningLoggerBase):
project_name: Optional. Send your experiment to a specific project.
Otherwise will be sent to Uncategorized Experiments.
If the project name does not already exist, Comet.ml will create a new project.
rest_api_key: Optional. Rest API key found in Comet.ml settings.
This is used to determine version number
rest_api_key: Deprecated
experiment_name: Optional. String representing the name for this particular experiment on Comet.ml.
experiment_key: Optional. If set, restores from existing experiment.
"""
Expand All @@ -95,7 +92,6 @@ def __init__(
save_dir: Optional[str] = None,
workspace: Optional[str] = None,
project_name: Optional[str] = None,
rest_api_key: Optional[str] = None,
experiment_name: Optional[str] = None,
experiment_key: Optional[str] = None,
**kwargs,
Expand Down Expand Up @@ -129,16 +125,6 @@ def __init__(
self.experiment_name = experiment_name
self._kwargs = kwargs

if rest_api_key is not None:
# Comet.ml rest API, used to determine version number
self.rest_api_key = rest_api_key
self.comet_api = API(self.rest_api_key)
else:
self.rest_api_key = None
self.comet_api = None

self._kwargs = kwargs

@property
@rank_zero_experiment
def experiment(self) -> CometBaseExperiment:
Expand Down

0 comments on commit 0fd3299

Please sign in to comment.