File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -241,9 +241,9 @@ def create_slice(
241
241
242
242
:return: new Slice object
243
243
"""
244
- if dataset_item_ids and reference_ids :
244
+ if bool ( dataset_item_ids ) == bool ( reference_ids ) :
245
245
raise Exception (
246
- "You cannot specify both dataset_item_ids and reference_ids"
246
+ "You must specify exactly one of dataset_item_ids or reference_ids. "
247
247
)
248
248
payload : Dict [str , Any ] = {NAME_KEY : name }
249
249
if dataset_item_ids :
Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ def serialize_and_write(
77
77
):
78
78
for unit in upload_unit :
79
79
try :
80
- file_pointer .write (unit .to_json ())
80
+ file_pointer .write (unit .to_json () + " \n " )
81
81
except TypeError as e :
82
82
type_name = type (unit ).__name__
83
83
message = (
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ exclude = '''
21
21
22
22
[tool .poetry ]
23
23
name = " scale-nucleus"
24
- version = " 0.1.2 "
24
+ version = " 0.1.3 "
25
25
description = " The official Python client library for Nucleus, the Data Platform for AI"
26
26
license = " MIT"
27
27
authors = [" Scale AI Nucleus Team <nucleusapi@scaleapi.com>" ]
@@ -32,7 +32,7 @@ documentation = "https://dashboard.scale.com/nucleus/docs/api"
32
32
packages = [{include =" nucleus" }]
33
33
34
34
[tool .poetry .dependencies ]
35
- python = " ^3.6.1 "
35
+ python = " ^3.6.2 "
36
36
grequests = " ^0.6.0"
37
37
requests = " ^2.25.1"
38
38
tqdm = " ^4.60.0"
You can’t perform that action at this time.
0 commit comments