Skip to content

Commit 5807498

Browse files
committed
Fix issue with project.push()
1 parent a6470ff commit 5807498

File tree

2 files changed

+4
-11
lines changed

2 files changed

+4
-11
lines changed

examples/tabular-regression/sklearn/diabetes-prediction/diabetes-prediction-sklearn.ipynb

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@
190190
"\n",
191191
"project = client.create_or_load_project(\n",
192192
" name=\"Diabetes Prediction\", \n",
193-
" task_type=TaskType.TabularClassification,\n",
193+
" task_type=TaskType.TabularRegression,\n",
194194
" description=\"Evaluation of ML approaches to predict diabetes.\"\n",
195195
")"
196196
]
@@ -654,13 +654,6 @@
654654
"source": [
655655
"project.push()"
656656
]
657-
},
658-
{
659-
"cell_type": "code",
660-
"execution_count": null,
661-
"metadata": {},
662-
"outputs": [],
663-
"source": []
664657
}
665658
],
666659
"metadata": {
@@ -679,7 +672,7 @@
679672
"name": "python",
680673
"nbconvert_exporter": "python",
681674
"pygments_lexer": "ipython3",
682-
"version": "3.8.13"
675+
"version": "3.8.10"
683676
}
684677
},
685678
"nbformat": 4,

openlayer/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1105,7 +1105,7 @@ def push(self, project_id: int, task_type: TaskType):
11051105
"""
11061106
project_dir = f"{OPENLAYER_DIR}/{project_id}/staging"
11071107

1108-
if self._ready_for_push(project_dir=project_dir):
1108+
if self._ready_for_push(project_dir=project_dir, task_type=task_type):
11091109
with open(
11101110
f"{project_dir}/commit.yaml", "r", encoding="UTF-8"
11111111
) as commit_file:
@@ -1134,7 +1134,7 @@ def push(self, project_id: int, task_type: TaskType):
11341134
self._post_push_cleanup(project_dir=project_dir)
11351135
print("Pushed!")
11361136

1137-
def _ready_for_push(self, project_dir: str) -> bool:
1137+
def _ready_for_push(self, project_dir: str, task_type: TaskType) -> bool:
11381138
"""Checks if the project's staging area is ready to be pushed to the platform.
11391139
11401140
Parameters

0 commit comments

Comments
 (0)