Skip to content

Commit 4d6daec

Browse files
Pydoc edits (#480)
* Pydoc edits * Fix lint error
1 parent 86d4aec commit 4d6daec

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

firebase_admin/ml.py

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def _get_ml_service(app):
7878

7979

8080
def create_model(model, app=None):
81-
"""Creates a model in Firebase ML.
81+
"""Creates a model in the current Firebase project.
8282
8383
Args:
8484
model: An ml.Model to create.
@@ -92,7 +92,7 @@ def create_model(model, app=None):
9292

9393

9494
def update_model(model, app=None):
95-
"""Updates a model in Firebase ML.
95+
"""Updates a model's metadata or model file.
9696
9797
Args:
9898
model: The ml.Model to update.
@@ -106,7 +106,9 @@ def update_model(model, app=None):
106106

107107

108108
def publish_model(model_id, app=None):
109-
"""Publishes a model in Firebase ML.
109+
"""Publishes a Firebase ML model.
110+
111+
A published model can be downloaded to client apps.
110112
111113
Args:
112114
model_id: The id of the model to publish.
@@ -120,7 +122,7 @@ def publish_model(model_id, app=None):
120122

121123

122124
def unpublish_model(model_id, app=None):
123-
"""Unpublishes a model in Firebase ML.
125+
"""Unpublishes a Firebase ML model.
124126
125127
Args:
126128
model_id: The id of the model to unpublish.
@@ -134,7 +136,7 @@ def unpublish_model(model_id, app=None):
134136

135137

136138
def get_model(model_id, app=None):
137-
"""Gets a model from Firebase ML.
139+
"""Gets the model specified by the given ID.
138140
139141
Args:
140142
model_id: The id of the model to get.
@@ -148,7 +150,7 @@ def get_model(model_id, app=None):
148150

149151

150152
def list_models(list_filter=None, page_size=None, page_token=None, app=None):
151-
"""Lists models from Firebase ML.
153+
"""Lists the current project's models.
152154
153155
Args:
154156
list_filter: a list filter string such as ``tags:'tag_1'``. None will return all models.
@@ -167,7 +169,7 @@ def list_models(list_filter=None, page_size=None, page_token=None, app=None):
167169

168170

169171
def delete_model(model_id, app=None):
170-
"""Deletes a model from Firebase ML.
172+
"""Deletes a model from the current project.
171173
172174
Args:
173175
model_id: The id of the model you wish to delete.
@@ -602,7 +604,7 @@ def as_dict(self, for_upload=False):
602604

603605

604606
class TFLiteAutoMlSource(TFLiteModelSource):
605-
"""TFLite model source representing a tflite model created via AutoML."""
607+
"""TFLite model source representing a tflite model created with AutoML."""
606608

607609
def __init__(self, auto_ml_model, app=None):
608610
self._app = app
@@ -618,7 +620,7 @@ def __ne__(self, other):
618620

619621
@property
620622
def auto_ml_model(self):
621-
"""Resource name of the model created by the AutoML API."""
623+
"""Resource name of the model, created by the AutoML API or Cloud console."""
622624
return self._auto_ml_model
623625

624626
@auto_ml_model.setter
@@ -632,7 +634,7 @@ def as_dict(self, for_upload=False):
632634

633635

634636
class ListModelsPage:
635-
"""Represents a page of models in a firebase project.
637+
"""Represents a page of models in a Firebase project.
636638
637639
Provides methods for traversing the models included in this page, as well as
638640
retrieving subsequent pages of models. The iterator returned by

0 commit comments

Comments
 (0)