Skip to content

Commit 3d75cf8

Browse files
committed
Update model description -> commit_message
1 parent b2518b4 commit 3d75cf8

File tree

3 files changed

+21
-34
lines changed

3 files changed

+21
-34
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1313
* Deprecates `categorical_features_map` in favor of `categorical_feature_names` for model and dataset uploads.
1414
* Added a convenience method `create_or_load_project` which loads in a project in if it is already created.
1515
* Moved `TaskType` attribute from the `Model` level to the `Project` level. Creating a `Project` now requires specifying the `TaskType`.
16+
* Removed `name` from `add_dataset`.
17+
* Changed `description` to `commit_message` from `add_dataset`, `add_dataframe` and `add_model`.
1618

1719
## [0.2.0a1]
1820

examples/tabular-classification/churn-classifier/churn-classifier-sklearn.ipynb

Lines changed: 16 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -233,31 +233,32 @@
233233
"metadata": {},
234234
"outputs": [],
235235
"source": [
236-
"\n",
237236
"from unboxapi.tasks import TaskType\n",
238237
"\n",
239-
"# Comment this out and uncomment the next section to load the project\n",
240-
"project = client.create_project(\n",
238+
"project = client.create_or_load_project(\n",
241239
" name=\"Banking Churn Project\",\n",
242240
" description=\"Project for Predicting Banking Churn\",\n",
243241
" task_type=TaskType.TabularClassification,\n",
244-
")\n",
245-
"'''\n",
246-
"# Use this for loading the project on subsequent runs\n",
247-
"project = client.load_project(\n",
248-
" name=\"Banking Churn Project\"\n",
249-
")\n",
250-
"'''\n",
242+
")\n"
243+
]
244+
},
245+
{
246+
"cell_type": "code",
247+
"execution_count": null,
248+
"id": "d19865ca",
249+
"metadata": {},
250+
"outputs": [],
251+
"source": [
251252
"dataset = project.add_dataframe(\n",
252253
" df=x_val,\n",
253254
" class_names=class_names,\n",
254255
" label_column_name='churn',\n",
255-
" name=\"Churn Validation\",\n",
256-
" description='this is my churn dataset',\n",
256+
" commit_message='first version',\n",
257257
" task_type=TaskType.TabularClassification,\n",
258258
" feature_names=feature_names,\n",
259259
" categorical_feature_names=[\"Gender\", \"Geography\"],\n",
260-
")"
260+
")\n",
261+
"dataset.to_dict()"
261262
]
262263
},
263264
{
@@ -273,7 +274,7 @@
273274
" model_type=ModelType.sklearn,\n",
274275
" class_names=class_names,\n",
275276
" name='Churn Classifier',\n",
276-
" description='this is my churn classification model',\n",
277+
" commit_message='first version',\n",
277278
" feature_names=feature_names,\n",
278279
" train_sample_df=x_train[:3000],\n",
279280
" train_sample_label_column_name='churn',\n",
@@ -284,22 +285,6 @@
284285
")\n",
285286
"model.to_dict()"
286287
]
287-
},
288-
{
289-
"cell_type": "code",
290-
"execution_count": null,
291-
"id": "74cae32f",
292-
"metadata": {},
293-
"outputs": [],
294-
"source": []
295-
},
296-
{
297-
"cell_type": "code",
298-
"execution_count": null,
299-
"id": "b4ecb0cf",
300-
"metadata": {},
301-
"outputs": [],
302-
"source": []
303288
}
304289
],
305290
"metadata": {
@@ -318,7 +303,7 @@
318303
"name": "python",
319304
"nbconvert_exporter": "python",
320305
"pygments_lexer": "ipython3",
321-
"version": "3.8.12"
306+
"version": "3.8.10"
322307
}
323308
},
324309
"nbformat": 4,

unboxapi/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def add_model(
9999
setup_script: Optional[str] = None,
100100
custom_model_code: Optional[str] = None,
101101
dependent_dir: Optional[str] = None,
102-
description: str = None,
102+
commit_message: str = None,
103103
project_id: str = None,
104104
**kwargs,
105105
) -> Model:
@@ -152,7 +152,7 @@ def add_model(
152152
dependent_dir : str, default None
153153
Path to a dir of file dependencies needed to load the model. Required if your ``model_type``
154154
is :obj:`ModelType.custom`.
155-
description : str, default None
155+
commit_message : str, default None
156156
Commit message for this version.
157157
**kwargs
158158
Any additional keyword args you would like to pass to your ``predict_proba`` function.
@@ -447,7 +447,7 @@ def add_model(
447447
endpoint = f"projects/{project_id}/ml-models"
448448
payload = dict(
449449
name=name,
450-
description=description,
450+
commitMessage=commit_message,
451451
classNames=class_names,
452452
architectureType=model_type.name,
453453
kwargs=list(kwargs.keys()),

0 commit comments

Comments
 (0)