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

chore: e2e test for adapters and validation of adapters #483

Merged
merged 4 commits into from
Jun 29, 2024

Conversation

bangqipropel
Copy link
Collaborator

Reason for Change:

Requirements

  • added unit tests and e2e tests (if applicable).

Issue Fixed:

Notes for Reviewers:

@bangqipropel bangqipropel force-pushed the bangqipropel/adapter_e2e_test branch from cc0f886 to 903e9e0 Compare June 27, 2024 18:30
@bangqipropel bangqipropel force-pushed the bangqipropel/adapter_e2e_test branch from 903e9e0 to 5570b5d Compare June 27, 2024 20:14
Comment on lines 81 to 104
var err error
runLlama13B, err = strconv.ParseBool(os.Getenv("RUN_LLAMA_13B"))
if err != nil {
// Handle error or set a default value
fmt.Print("Error: RUN_LLAMA_13B ENV Variable not set")
runLlama13B = false
}

aiModelsRegistry = utils.GetEnv("AI_MODELS_REGISTRY")
aiModelsRegistrySecret = utils.GetEnv("AI_MODELS_REGISTRY_SECRET")
supportedModelsYamlPath = utils.GetEnv("SUPPORTED_MODELS_YAML_PATH")

// Load stable model versions
configs, err := utils.GetModelConfigInfo(supportedModelsYamlPath)
if err != nil {
fmt.Printf("Failed to load model configs: %v\n", err)
os.Exit(1)
}

modelInfo, err = utils.ExtractModelVersion(configs)
if err != nil {
fmt.Printf("Failed to extract stable model versions: %v\n", err)
os.Exit(1)
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is duplicated from preset_test.go. We can make this a function

func loadTestEnvVars() {
    var err error
    runLlama13B, err = strconv.ParseBool(os.Getenv("RUN_LLAMA_13B"))
    if err != nil {
        fmt.Print("Error: RUN_LLAMA_13B ENV Variable not set")
        runLlama13B = false
    }

    aiModelsRegistry = utils.GetEnv("AI_MODELS_REGISTRY")
    aiModelsRegistrySecret = utils.GetEnv("AI_MODELS_REGISTRY_SECRET")
    supportedModelsYamlPath = utils.GetEnv("SUPPORTED_MODELS_YAML_PATH")
}

func loadModelVersions() {
    configs, err := utils.GetModelConfigInfo(supportedModelsYamlPath)
    if err != nil {
        fmt.Printf("Failed to load model configs: %v\n", err)
        os.Exit(1)
    }

    modelInfo, err = utils.ExtractModelVersion(configs)
    if err != nil {
        fmt.Printf("Failed to extract stable model versions: %v\n", err)
        os.Exit(1)
    }
}

Copy link

codecov bot commented Jun 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 61.02%. Comparing base (45e75aa) to head (5c5505f).
Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #483      +/-   ##
==========================================
+ Coverage   60.92%   61.02%   +0.09%     
==========================================
  Files          29       29              
  Lines        2559     2568       +9     
==========================================
+ Hits         1559     1567       +8     
- Misses        909      910       +1     
  Partials       91       91              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Bangqi Zhu added 3 commits June 28, 2024 12:24
Signed-off-by: Bangqi Zhu <[email protected]>
Signed-off-by: Bangqi Zhu <[email protected]>
Signed-off-by: Bangqi Zhu <[email protected]>
@bangqipropel bangqipropel merged commit f613679 into main Jun 29, 2024
9 of 11 checks passed
@bangqipropel bangqipropel deleted the bangqipropel/adapter_e2e_test branch June 29, 2024 02:44
smritidahal653 pushed a commit to smritidahal653/kaito that referenced this pull request Jul 12, 2024
…t#483)

**Reason for Change**:
<!-- What does this PR improve or fix in Kaito? Why is it needed? -->

**Requirements**

- [ ] added unit tests and e2e tests (if applicable).

**Issue Fixed**:
<!-- If this PR fixes GitHub issue 4321, add "Fixes #4321" to the next
line. -->

**Notes for Reviewers**:

---------

Signed-off-by: Bangqi Zhu <[email protected]>
Co-authored-by: Bangqi Zhu <[email protected]>
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.

3 participants