Skip to content
This repository was archived by the owner on Sep 13, 2023. It is now read-only.

Client classes for Servers #185

Merged
merged 17 commits into from
Apr 13, 2022
Merged

Client classes for Servers #185

merged 17 commits into from
Apr 13, 2022

Conversation

madhur-tandon
Copy link
Contributor

Fixes #40

I could appreciate a pair session for this task since the ebonite reference is kinda overwhelming -- there are many things I am sure of which we could eliminate. CC: @mike0sv

@madhur-tandon madhur-tandon requested a review from a team April 4, 2022 09:47
@codecov
Copy link

codecov bot commented Apr 4, 2022

Codecov Report

Merging #185 (f77f948) into main (8b5dace) will increase coverage by 2.03%.
The diff coverage is 97.08%.

@@            Coverage Diff             @@
##             main     #185      +/-   ##
==========================================
+ Coverage   87.48%   89.52%   +2.03%     
==========================================
  Files          74       74              
  Lines        4812     4896      +84     
==========================================
+ Hits         4210     4383     +173     
+ Misses        602      513      -89     
Impacted Files Coverage Δ
mlem/runtime/client/base.py 95.23% <95.00%> (-4.77%) ⬇️
mlem/contrib/fastapi.py 95.16% <100.00%> (+0.61%) ⬆️
mlem/contrib/lightgbm.py 95.77% <100.00%> (+0.18%) ⬆️
mlem/contrib/numpy.py 94.94% <100.00%> (+0.05%) ⬆️
mlem/contrib/xgboost.py 97.56% <100.00%> (+0.06%) ⬆️
mlem/core/dataset_type.py 96.31% <100.00%> (+9.74%) ⬆️
mlem/core/meta_io.py 94.96% <0.00%> (+0.62%) ⬆️
mlem/core/objects.py 91.11% <0.00%> (+3.70%) ⬆️
mlem/contrib/docker/base.py 86.18% <0.00%> (+4.41%) ⬆️
mlem/api/utils.py 88.88% <0.00%> (+4.44%) ⬆️
... and 5 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1867564...f77f948. Read the comment docs.

@madhur-tandon madhur-tandon changed the title WIP: Client classes for Servers Client classes for Servers Apr 6, 2022
@madhur-tandon madhur-tandon self-assigned this Apr 6, 2022
@madhur-tandon
Copy link
Contributor Author

@mike0sv we can discuss writing tests a bit. The endpoint /interface.json works, but parse_obj_as(InterfaceDescriptor, resp.json()) seems to fail due to

pydantic.error_wrappers.ValidationError: 1 validation error for ParsingModel[InterfaceDescriptor]
__root__
  value is not a valid dict (type=type_error.dict)

Moreover, since we are using our own client instead of FastAPI's TestClient, we need to run the server (as a fixture) within a thread or perhaps a different process.
We can fix this today and wrap this PR if it's okay by a bit of discussion.

@madhur-tandon
Copy link
Contributor Author

@mike0sv ready to merge!

@madhur-tandon madhur-tandon requested a review from mike0sv April 13, 2022 17:16
@madhur-tandon madhur-tandon merged commit a796afa into main Apr 13, 2022
@madhur-tandon madhur-tandon deleted the feature/client branch April 13, 2022 18:17
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Client classes for Servers
2 participants