oracle / accelerated-data-science

ADS is the Oracle Data Science Cloud Service's python SDK supporting, model ops (train/eval/deploy), along with running workloads on Jobs and Pipeline resources.
https://accelerated-data-science.readthedocs.io/
Universal Permissive License v1.0
87 stars 43 forks source link

Add HF integration APIs #913

Closed VipulMascarenhas closed 2 months ago

VipulMascarenhas commented 2 months ago

Description

This PR add the following APIs:

  1. Get HF Model Details

Request

POST aqua/model/hf/search

BODY
{
  "model_id": "codellama/CodeLlama-7b-Instruct-hf"
}

Response

{
    "model_info": {
        "id": "codellama/CodeLlama-7b-Instruct-hf",
        "author": "codellama",
        "sha": "22cb240e0292b0b5ab4c17ccd97aa3a2f799cbed",
      ....
      ....
  1. Hugging Face Login

Request

POST http://localhost:8888/aqua/hf_login

{
  "token": "your token here"
}

Response

{
    "status": 200,
    "message": "login successful"
}
  1. Check if user is already logged in

Request

POST http://localhost:8888/aqua/hf_login

{
  "token": "your token here"
}

Response

{
    "status": 200,
    "message": "login successful"
}

Unit Tests

github-actions[bot] commented 2 months ago

⚠️ This PR changed pyproject.toml file. ⚠️

github-actions[bot] commented 2 months ago

⚠️ This PR changed pyproject.toml file. ⚠️

github-actions[bot] commented 2 months ago

⚠️ This PR changed pyproject.toml file. ⚠️