Skip to content

Commit c8e9fb4

Browse files
Add docstrings in mlflow logger class (#9030)
Co-authored-by: Ethan Harris <[email protected]>
1 parent c912ebf commit c8e9fb4

File tree

1 file changed

+26
-4
lines changed

1 file changed

+26
-4
lines changed

pytorch_lightning/loggers/mlflow.py

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -171,14 +171,24 @@ def experiment(self) -> MlflowClient:
171171
return self._mlflow_client
172172

173173
@property
174-
def run_id(self):
175-
# create the experiment if it does not exist to get the run id
174+
def run_id(self) -> str:
175+
"""
176+
Create the experiment if it does not exist to get the run id.
177+
178+
Returns:
179+
The run id.
180+
"""
176181
_ = self.experiment
177182
return self._run_id
178183

179184
@property
180-
def experiment_id(self):
181-
# create the experiment if it does not exist to get the experiment id
185+
def experiment_id(self) -> str:
186+
"""
187+
Create the experiment if it does not exist to get the experiment id.
188+
189+
Returns:
190+
The experiment id.
191+
"""
182192
_ = self.experiment
183193
return self._experiment_id
184194

@@ -239,8 +249,20 @@ def save_dir(self) -> Optional[str]:
239249

240250
@property
241251
def name(self) -> str:
252+
"""
253+
Get the experiment id.
254+
255+
Returns:
256+
The experiment id.
257+
"""
242258
return self.experiment_id
243259

244260
@property
245261
def version(self) -> str:
262+
"""
263+
Get the run id.
264+
265+
Returns:
266+
The run id.
267+
"""
246268
return self.run_id

0 commit comments

Comments
 (0)