kubetoolsca / krs

A GenAI-powered Kubetools Recommender System
https://kubetools.io
Apache License 2.0
106 stars 21 forks source link

Enhance KRS with GPU Support and Various Fixes #26

Closed Adesoji1 closed 4 months ago

Adesoji1 commented 4 months ago

@ajeetraina @karanveersingh5623

Pull Request Title

Enhance KRS with GPU Support and Various Fixes

Pull Request Description

Summary

This PR introduces several enhancements and fixes to the Kubernetes Recommendation Service (KRS). The main changes include adding GPU support for LLM models, refactoring the CLI commands, more readability, and ensuring proper dependency management.

Changes

  1. GPU Support for LLM Models:

    • i Modified llm_client.py to support GPU utilization for Hugging Face models.
    • i Updated KrsMain class in main.py to pass the device option (CPU/GPU) to KrsGPTClient.
  2. CLI Enhancements:

    • i Refactored krs.py to use Typer for CLI command definitions.
    • i Added a new version command to display the current version of KRS.
  3. Dependency Management:

    • i Created requirements.sh and requirements.bat for installing dependencies on Linux/macOS and Windows, respectively.
    • i Updated setup.py to conditionally execute the appropriate script based on the operating system.
  4. Initialization and Health Check:

    • i Improved initialization (init) and health check (health) commands to handle configuration more robustly.
    • i Added checks to ensure KRS is initialized before running other commands.
  5. Bug Fixes and Improvements:

    • i added Enhanced logging for better error tracking and debugging.
    • i Added error handling for invalid kubeconfig files.

Modified Files

Additional Information

Notes

Screenshots

i added a folder of screenshots

we need to Fix warnings related to GitHub stars conversion in fetch_tools_krs.py. Please review the changes and provide feedback because i don't have a kubeconfig file so i can't test the gpu yet. Let me know if any further modifications or clarifications are needed. i used python version 3.11 on ubuntu 22.03

python
Python 3.11.6 (main, Oct  8 2023, 05:06:43) [GCC 13.2.0] on linux
abhimazu commented 4 months ago

We are not accepting the changes until specifically targeted towards an issue raised by the community. Kindly work towards resolving an issue, if the admins approve it, you can contribute to it.

Adesoji1 commented 4 months ago

Thank you

On Tue, 25 June 2024, 1:41 am Abhijeet Mazumdar, @.***> wrote:

We are not accepting the changes until specifically targeted towards an issue raised by the community. Kindly work towards resolving an issue, if the admins approve it, you can contribute to it.

— Reply to this email directly, view it on GitHub https://github.com/kubetoolsca/krs/pull/26#issuecomment-2187694778, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE4COXFRZS6QMTEGSBDPU4TZJC4EHAVCNFSM6AAAAABJZ3WCQ2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOBXGY4TINZXHA . You are receiving this because you authored the thread.Message ID: @.***>