Skip to content

Commit 81748c8

Browse files
committed
[0.4.13] [fix] update from_json deser
1 parent 8642d7d commit 81748c8

File tree

7 files changed

+14
-13
lines changed

7 files changed

+14
-13
lines changed

.github/workflows/static.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ jobs:
5050
cd docs
5151
sphinx-apidoc -o source/ ../tuneapi
5252
make html
53+
ls -la _build/html
5354
5455
- name: Setup Pages
5556
uses: actions/configure-pages@v3

cookbooks/function_calling.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
"metadata": {},
77
"outputs": [],
88
"source": [
9-
"import tuneapi.types as tt\n",
10-
"import tuneapi.utils as tu\n",
11-
"import tuneapi.apis as ta"
9+
"from tuneapi import types as tt\n",
10+
"from tuneapi import utils as tu\n",
11+
"from tuneapi import apis as ta"
1212
]
1313
},
1414
{

docs/conf.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,13 @@
77

88
sys.path.insert(0, os.path.abspath("../"))
99

10-
from tuneapi import __version__
11-
1210
# -- Project information -----------------------------------------------------
1311
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
1412

1513
project = "tuneapi"
1614
copyright = "2024, Frello Technologies"
1715
author = "Frello Technologies"
18-
release = __version__
16+
release = "0.4.13"
1917

2018
# -- General configuration ---------------------------------------------------
2119
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "tuneapi"
3-
version = "0.4.12"
3+
version = "0.4.13"
44
description = "Tune AI APIs."
55
authors = ["Frello Technology Private Limited <[email protected]>"]
66
license = "MIT"

tuneapi/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Copyright © 2023- Frello Technology Private Limited
22

3-
__version__ = "0.4.12"
3+
__version__ = "0.4.13"

tuneapi/utils/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,13 @@
5252
)
5353
from tuneapi.utils.serdeser import (
5454
dict_to_structpb,
55-
from_b64,
56-
from_json,
57-
from_pickle,
5855
structpb_to_dict,
59-
to_b64,
6056
to_json,
57+
from_json,
58+
to_b64,
59+
from_b64,
6160
to_pickle,
61+
from_pickle,
6262
to_s3,
6363
from_s3,
6464
)

tuneapi/utils/serdeser.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,11 @@ def from_json(x: str = "") -> Dict[str, Any]:
5959
with open(x, "rb") as f:
6060
return json.loads(f.read().decode("utf-8", "ignore"))
6161
elif x.endswith(".jsonl"):
62+
output = []
6263
with open(x, "rb") as f:
6364
for line in f.read().decode("utf-8", "ignore").splitlines():
64-
return json.loads(line)
65+
output.append(json.loads(line))
66+
return output
6567
else:
6668
return json.loads(x)
6769

0 commit comments

Comments
 (0)