Skip to content

Commit 4a04282

Browse files
committed
Remove deprecated rest_api_key parameter from Comet Logger
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.
1 parent a1d8713 commit 4a04282

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

pytorch_lightning/loggers/comet.py

+1-15
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ class CometLogger(LightningLoggerBase):
5757
... workspace=os.environ.get('COMET_WORKSPACE'), # Optional
5858
... save_dir='.', # Optional
5959
... project_name='default_project', # Optional
60-
... rest_api_key=os.environ.get('COMET_REST_API_KEY'), # Optional
6160
... experiment_name='default' # Optional
6261
... )
6362
>>> trainer = Trainer(logger=comet_logger)
@@ -71,7 +70,6 @@ class CometLogger(LightningLoggerBase):
7170
... save_dir='.',
7271
... workspace=os.environ.get('COMET_WORKSPACE'), # Optional
7372
... project_name='default_project', # Optional
74-
... rest_api_key=os.environ.get('COMET_REST_API_KEY'), # Optional
7573
... experiment_name='default' # Optional
7674
... )
7775
>>> trainer = Trainer(logger=comet_logger)
@@ -83,8 +81,7 @@ class CometLogger(LightningLoggerBase):
8381
project_name: Optional. Send your experiment to a specific project.
8482
Otherwise will be sent to Uncategorized Experiments.
8583
If the project name does not already exist, Comet.ml will create a new project.
86-
rest_api_key: Optional. Rest API key found in Comet.ml settings.
87-
This is used to determine version number
84+
rest_api_key: Deprecated
8885
experiment_name: Optional. String representing the name for this particular experiment on Comet.ml.
8986
experiment_key: Optional. If set, restores from existing experiment.
9087
"""
@@ -95,7 +92,6 @@ def __init__(
9592
save_dir: Optional[str] = None,
9693
workspace: Optional[str] = None,
9794
project_name: Optional[str] = None,
98-
rest_api_key: Optional[str] = None,
9995
experiment_name: Optional[str] = None,
10096
experiment_key: Optional[str] = None,
10197
**kwargs,
@@ -129,16 +125,6 @@ def __init__(
129125
self.experiment_name = experiment_name
130126
self._kwargs = kwargs
131127

132-
if rest_api_key is not None:
133-
# Comet.ml rest API, used to determine version number
134-
self.rest_api_key = rest_api_key
135-
self.comet_api = API(self.rest_api_key)
136-
else:
137-
self.rest_api_key = None
138-
self.comet_api = None
139-
140-
self._kwargs = kwargs
141-
142128
@property
143129
@rank_zero_experiment
144130
def experiment(self) -> CometBaseExperiment:

0 commit comments

Comments
 (0)