Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: CaraML SDK - v0 #7

Merged
merged 29 commits into from
Feb 20, 2024
Merged

Conversation

maniteja6799
Copy link
Collaborator

@maniteja6799 maniteja6799 commented Feb 8, 2024

Consolidating sdk from all Caraml apps.

As part of this PR, [TLDR]

  • A new caraml-sdk is created with a specific skeleton structure.
  • Workflows added that can clone and generate openapi code from caraml-dev/merlin, caraml-dev/turing repos.
  • All wrapper code from the corresponding repos moved and restructured according to caraml-sdk.
  • All unit tests from corresponding repos moved to this caraml-sdk/tests.

CaraML SDK Structure

All SDK code of corresponding CaraML apps will be moved to models/routers/store packages.
common package will have session, project, secrets related code. [Not in scope of this PR]

.
├── common
├── models
│   ├── __init__.py
│   ├── client
├── routers
│   ├── __init__.py
│   ├── client
└── store

Generate and Sync Open API code from caraml-dev/merlin, caraml-dev/turing repos.

A new workflow (.github/workflows/caraml-sync-generated-client.yaml) to clone the repo and generate python client using openapi-generator-cli. This workflow accepts the following inputs :

      module:
        required: true
        description: "module name"
      repository:
        required: true
        description: "caraml app repo : `caraml-dev/merlin` or `caraml-dev/turing`"
      ref:
        required: true
        description: "the branch or tag to generate from"
        default: "main"
      openapi_generator_version:
        required: true
        description: "Open Api Generator cli version tag"
        default: v7.1.0
      openapi_schema:
        required: true
        description: "Open Api schema yaml file in the repo"
        default: "swagger.yaml"
      openapi_config:
        required: true
        description: "openapi generator config file"
        default: "openapi-sdk-codegen.yaml"   

!! NOTE: Turing needs to generate clients with v5.1.1 for now, Using the latest produces the client sdk with different format causing errors. This can be addressed later.

@maniteja6799
Copy link
Collaborator Author

After the a3ff01e commit, test results are

 86 failed, 124 passed, 7 skipped, 23 warnings in 23.69s 

@maniteja6799
Copy link
Collaborator Author

All non integration tests passing now.

 python3 -m pytest -n 8 -m "not integration" -W ignore tests/models/
======== test session starts =======
platform darwin -- Python 3.8.5, pytest-8.0.0, pluggy-1.4.0
rootdir: /Users/kuppilpawanmaniteja/Documents/github/caraml-sdk/packages/caraml
plugins: cov-4.1.0, dependency-0.6.0, xdist-3.5.0
8 workers [160 items]   
.................[100%]
======= 160 passed in 9.37s =======

@maniteja6799
Copy link
Collaborator Author

Turing wrapper code added to the PR. One test case failing, on first look, it seems to be an integration test which connects to turing server. Can be checked later.

================================== short test summary info =============================
FAILED tests/routers/ensembler_test.py::test_list_ensemblers[6] - AssertionError: Regex pattern did not match.
=========== 1 failed, 375 passed in 8.12s =======

@maniteja6799 maniteja6799 changed the title feat: [WIP] CaraML SDK feat: CaraML SDK - v0 Feb 13, 2024
@maniteja6799 maniteja6799 self-assigned this Feb 20, 2024
@maniteja6799 maniteja6799 merged commit eccaf3b into caraml-dev:main Feb 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants