Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ numpy==2.2.6
# skops
# skore
# skrub
orjson==3.11.3
# via skore-hub-project (skore-hub-project/pyproject.toml)
packaging==25.0
# via
# altair
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ numpy==2.2.6
# skops
# skore
# skrub
orjson==3.11.3
# via skore-hub-project (skore-hub-project/pyproject.toml)
packaging==25.0
# via
# altair
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ numpy==2.3.2
# skops
# skore
# skrub
orjson==3.11.3
# via skore-hub-project (skore-hub-project/pyproject.toml)
packaging==25.0
# via
# altair
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ numpy==2.3.2
# skops
# skore
# skrub
orjson==3.11.3
# via skore-hub-project (skore-hub-project/pyproject.toml)
packaging==25.0
# via
# altair
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ numpy==2.3.2
# skops
# skore
# skrub
orjson==3.11.3
# via skore-hub-project (skore-hub-project/pyproject.toml)
packaging==25.0
# via
# altair
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ numpy==2.3.2
# skops
# skore
# skrub
orjson==3.11.3
# via skore-hub-project (skore-hub-project/pyproject.toml)
packaging==25.0
# via
# altair
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ numpy==2.3.2
# skops
# skore
# skrub
orjson==3.11.3
# via skore-hub-project (skore-hub-project/pyproject.toml)
packaging==25.0
# via
# altair
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ numpy==2.3.2
# skops
# skore
# skrub
orjson==3.11.3
# via skore-hub-project (skore-hub-project/pyproject.toml)
packaging==25.0
# via
# altair
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ numpy==2.3.2
# skops
# skore
# skrub
orjson==3.11.3
# via skore-hub-project (skore-hub-project/pyproject.toml)
packaging==25.0
# via
# altair
Expand Down
1 change: 1 addition & 0 deletions skore-hub-project/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ dependencies = [
"httpx",
"joblib",
"matplotlib",
"orjson",
"pydantic",
"rich",
"scikit-learn",
Expand Down
11 changes: 10 additions & 1 deletion skore-hub-project/src/skore_hub_project/project/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from typing import TYPE_CHECKING

import joblib
import orjson

from skore_hub_project.client.client import Client, HTTPStatusError, HUBClient
from skore_hub_project.protocol import CrossValidationReport, EstimatorReport
Expand Down Expand Up @@ -178,9 +179,17 @@ def put(self, key: str, report: EstimatorReport | CrossValidationReport):

payload = Payload(project=self, key=key, report=report)
payload_dict = payload.model_dump()
payload_json_bytes = orjson.dumps(payload_dict, option=orjson.OPT_NON_STR_KEYS)

with HUBClient() as client:
client.post(url=url, json=payload_dict)
client.post(
url=url,
content=payload_json_bytes,
headers={
"Content-Length": str(len(payload_json_bytes)),
"Content-Type": "application/json",
},
)

@ensure_project_is_created
def get(self, urn: str) -> EstimatorReport | CrossValidationReport:
Expand Down
Loading