atlasai-dstoolkit-client 0.0.11__py3-none-any.whl → 0.0.12__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- atlasai/toolkit/model.py +17 -4
- {atlasai_dstoolkit_client-0.0.11.dist-info → atlasai_dstoolkit_client-0.0.12.dist-info}/METADATA +1 -1
- {atlasai_dstoolkit_client-0.0.11.dist-info → atlasai_dstoolkit_client-0.0.12.dist-info}/RECORD +6 -6
- {atlasai_dstoolkit_client-0.0.11.dist-info → atlasai_dstoolkit_client-0.0.12.dist-info}/LICENSE.txt +0 -0
- {atlasai_dstoolkit_client-0.0.11.dist-info → atlasai_dstoolkit_client-0.0.12.dist-info}/WHEEL +0 -0
- {atlasai_dstoolkit_client-0.0.11.dist-info → atlasai_dstoolkit_client-0.0.12.dist-info}/top_level.txt +0 -0
atlasai/toolkit/model.py
CHANGED
@@ -12,13 +12,13 @@
|
|
12
12
|
# See the License for the specific language governing permissions and
|
13
13
|
# limitations under the License.
|
14
14
|
|
15
|
-
import json
|
16
15
|
import pandas as pd
|
17
16
|
from typing import Union
|
18
17
|
|
19
18
|
from atlasai.mlhub import client
|
20
19
|
|
21
20
|
from .api import _get_access_token
|
21
|
+
from .utils import is_notebook
|
22
22
|
|
23
23
|
|
24
24
|
def search(name=None, version=None, source=None, tags=None, aliases=None):
|
@@ -73,16 +73,29 @@ class ModelResults:
|
|
73
73
|
def __iter__(self):
|
74
74
|
return iter(self.results)
|
75
75
|
|
76
|
+
def __getitem__(self, index):
|
77
|
+
return self.results[index]
|
78
|
+
|
79
|
+
def display_tags(self, tags):
|
80
|
+
if not isinstance(tags, dict):
|
81
|
+
return tags
|
82
|
+
return '\n'.join([f'{k}:{v}' for k, v in tags.items()])
|
83
|
+
|
76
84
|
def display(self):
|
77
85
|
data = [
|
78
86
|
{
|
79
87
|
'name': r.name,
|
80
88
|
'version': r.version,
|
81
89
|
'aliases': r.aliases if r.aliases else '',
|
82
|
-
'tags':
|
90
|
+
'tags': self.display_tags(r.tags)
|
83
91
|
} for r in self.results
|
84
92
|
]
|
85
|
-
|
93
|
+
df = pd.DataFrame(data)
|
94
|
+
if is_notebook():
|
95
|
+
from IPython.display import display, HTML
|
96
|
+
html = df.to_html().replace("\\n", "<br>")
|
97
|
+
display(HTML(html))
|
98
|
+
return df
|
86
99
|
|
87
100
|
def first(self):
|
88
101
|
return self.results[0]
|
@@ -118,7 +131,7 @@ class ModelSearch:
|
|
118
131
|
return ModelResults([ModelPredictWrapper(r) for r in results])
|
119
132
|
|
120
133
|
class ModelGet:
|
121
|
-
def __init__(self, name, version=
|
134
|
+
def __init__(self, name, version=None):
|
122
135
|
self.name = name
|
123
136
|
self.version = version
|
124
137
|
|
{atlasai_dstoolkit_client-0.0.11.dist-info → atlasai_dstoolkit_client-0.0.12.dist-info}/RECORD
RENAMED
@@ -6,11 +6,11 @@ atlasai/toolkit/fabric.py,sha256=6aFR2PGQc9P3Qa07WdBg9eKoUzU8n2y_-gGjYcyMrWY,192
|
|
6
6
|
atlasai/toolkit/feature.py,sha256=VKwX_yAwwMo1WuLZ_RbKVJEH4L1PAoYEPzWa0lH9ats,2828
|
7
7
|
atlasai/toolkit/init.py,sha256=JkdJ6QGdYWrq65jgz2pn5RYXUeUe2Ez88_-eMf5CNi0,1100
|
8
8
|
atlasai/toolkit/login.py,sha256=n4ydfo9qCsmbZq6er1xeljBD76vdTJGjbhYHMmOyDbQ,3061
|
9
|
-
atlasai/toolkit/model.py,sha256=
|
9
|
+
atlasai/toolkit/model.py,sha256=RUe0HbDpzvHOV9A4rzG3PgN9boMWDHQ2tR7IKHXzbx8,4126
|
10
10
|
atlasai/toolkit/requests.py,sha256=X86nIo07hAjUlilZcZ1lV8RB7KOsTKbTGtcY_SpFEXY,1223
|
11
11
|
atlasai/toolkit/utils.py,sha256=lYh3P2XOshRgHCjFeXJ0FOJWQW64sddgx8c2kL6Wqwc,1566
|
12
|
-
atlasai_dstoolkit_client-0.0.
|
13
|
-
atlasai_dstoolkit_client-0.0.
|
14
|
-
atlasai_dstoolkit_client-0.0.
|
15
|
-
atlasai_dstoolkit_client-0.0.
|
16
|
-
atlasai_dstoolkit_client-0.0.
|
12
|
+
atlasai_dstoolkit_client-0.0.12.dist-info/LICENSE.txt,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
|
13
|
+
atlasai_dstoolkit_client-0.0.12.dist-info/METADATA,sha256=2vdA8hWTJEIvSm1OgPRt9wmsTtZO_5oR_znxLDNuDbI,1405
|
14
|
+
atlasai_dstoolkit_client-0.0.12.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
|
15
|
+
atlasai_dstoolkit_client-0.0.12.dist-info/top_level.txt,sha256=HRTbErU8nmHFDaJJ5R_XYbwpt21dqdjDpSva8xyy_0k,8
|
16
|
+
atlasai_dstoolkit_client-0.0.12.dist-info/RECORD,,
|
{atlasai_dstoolkit_client-0.0.11.dist-info → atlasai_dstoolkit_client-0.0.12.dist-info}/LICENSE.txt
RENAMED
File without changes
|
{atlasai_dstoolkit_client-0.0.11.dist-info → atlasai_dstoolkit_client-0.0.12.dist-info}/WHEEL
RENAMED
File without changes
|
File without changes
|