|
1 | 1 | import csv |
2 | 2 | import os |
3 | | -import pandas as pd |
4 | 3 | import shutil |
5 | 4 | import tarfile |
6 | 5 | import tempfile |
7 | 6 | import uuid |
8 | | - |
9 | 7 | from enum import Enum |
| 8 | +from typing import Dict, List, Optional |
10 | 9 |
|
11 | | -from .api import Api |
| 10 | +import pandas as pd |
12 | 11 | from bentoml.saved_bundle.bundler import _write_bento_content_to_dir |
13 | 12 | from bentoml.utils.tempdir import TempDirectory |
| 13 | + |
| 14 | +from .api import Api |
| 15 | +from .datasets import Dataset |
14 | 16 | from .exceptions import UnboxDuplicateTask, UnboxException, UnboxInvalidRequest |
15 | 17 | from .models import Model, ModelType, create_template_model |
16 | | -from .datasets import Dataset |
17 | | -from .tasks import TaskType |
18 | | -from typing import Dict, List, Optional |
19 | 18 | from .projects import Project |
20 | | -from .version import __version__ |
| 19 | +from .tasks import TaskType |
| 20 | +from .version import __version__ # noqa: F401 |
21 | 21 |
|
22 | 22 |
|
23 | 23 | class DeploymentType(Enum): |
@@ -65,18 +65,16 @@ def __init__(self, api_key: str): |
65 | 65 | def create_project(self, name: str, description: str, task_type: TaskType): |
66 | 66 | endpoint = "projects" |
67 | 67 | payload = dict( |
68 | | - name=name, |
| 68 | + name=name, |
69 | 69 | description=description, |
70 | 70 | taskType=task_type.value, |
71 | 71 | ) |
72 | 72 | project_data = self.api.post_request(endpoint, body=payload) |
73 | | - print(project_data) |
74 | 73 | return Project(project_data, self.upload, self.subscription_plan, self) |
75 | 74 |
|
76 | 75 | def load_project(self, name: str): |
77 | 76 | endpoint = f"me/projects/{name}" |
78 | 77 | project_data = self.api.get_request(endpoint) |
79 | | - print(project_data) |
80 | 78 | return Project(project_data, self.upload, self.subscription_plan, self) |
81 | 79 |
|
82 | 80 | def create_or_load_project(self, name: str, description: str, task_type: TaskType): |
|
0 commit comments