{"id":13487418,"url":"https://github.com/codelibs/fione-serving","last_synced_at":"2026-05-02T15:42:26.632Z","repository":{"id":40590715,"uuid":"237556267","full_name":"codelibs/fione-serving","owner":"codelibs","description":"Fione Serving Server for H2O MOJO","archived":false,"fork":false,"pushed_at":"2023-04-29T05:34:23.000Z","size":78,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-01-28T10:36:14.225Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codelibs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2020-02-01T03:32:55.000Z","updated_at":"2022-04-22T12:18:56.000Z","dependencies_parsed_at":"2024-01-16T09:01:18.040Z","dependency_job_id":"fd5378df-0aa9-42a4-8f61-596671f4fee1","html_url":"https://github.com/codelibs/fione-serving","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codelibs%2Ffione-serving","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codelibs%2Ffione-serving/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codelibs%2Ffione-serving/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codelibs%2Ffione-serving/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codelibs","download_url":"https://codeload.github.com/codelibs/fione-serving/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245052673,"owners_count":20553172,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T18:00:59.005Z","updated_at":"2026-05-02T15:42:26.627Z","avatar_url":"https://github.com/codelibs.png","language":"Java","funding_links":[],"categories":["Java"],"sub_categories":[],"readme":"Fione Serving\n[![Java CI with Maven](https://github.com/codelibs/fione-serving/actions/workflows/maven.yml/badge.svg)](https://github.com/codelibs/fione-serving/actions/workflows/maven.yml)\n=========\n\n## Overview\n\nFione Serving is a RESTful API server for serving H2O MOJO (Model Object, Optimized) models. It provides a simple and efficient way to deploy H2O machine learning models for real-time predictions via HTTP endpoints.\n\nBuilt on Spring Boot 3.5.7, Fione Serving supports various H2O model types including:\n- Binomial classification models\n- Multinomial classification models\n- Regression models\n- XGBoost models (via h2o-genmodel-ext-xgboost)\n\n## Requirements\n\n- Java 17 or later\n- Maven 3.x\n- H2O MOJO model file (.zip)\n\n## Build\n\nBuild the project using Maven:\n\n```bash\nmvn clean package\n```\n\nThis will create an executable JAR file in the `target` directory:\n```\ntarget/fione-serving-3.40.0.0-SNAPSHOT.jar\n```\n\n## Configuration\n\n### Required Environment Variables\n\n- `MODEL_PATH`: Path to your H2O MOJO model file (.zip)\n\n### Optional Environment Variables\n\n- `ENABLE_LEAF_ASSIGNMENT`: Set to `true` to enable leaf assignment for tree-based models (default: `false`)\n- `ENABLE_CONTRIBUTIONS`: Set to `true` to enable SHAP contributions for supported models (default: `false`)\n\n### Alternative Configuration\n\nYou can also specify the model path using a system property:\n```bash\n-Dfione.serving.model.path=/path/to/model.zip\n```\n\n## Usage\n\n### Running the Server\n\n1. Set the required environment variable:\n```bash\nexport MODEL_PATH=/path/to/your/model.zip\n```\n\n2. Run the application:\n```bash\njava -jar target/fione-serving-3.40.0.0-SNAPSHOT.jar\n```\n\nOr use both methods together:\n```bash\nMODEL_PATH=/path/to/model.zip java -jar target/fione-serving-3.40.0.0-SNAPSHOT.jar\n```\n\nThe server will start on port 8080 by default.\n\n### API Endpoints\n\n#### 1. Health Check\n\nCheck if the server is running:\n\n**Request:**\n```bash\ncurl http://localhost:8080/ping\n```\n\n**Response:**\n```\n200 OK\n```\n\n#### 2. Get Model Information\n\nRetrieve detailed information about the loaded model:\n\n**Request:**\n```bash\ncurl -X GET http://localhost:8080/model \\\n  -H \"Content-Type: application/json\"\n```\n\n**Response Example:**\n```json\n{\n  \"names\": [\"feature1\", \"feature2\", \"target\"],\n  \"domains\": [null, null, [\"class0\", \"class1\"]],\n  \"responseColumn\": \"target\",\n  \"algoName\": \"GBM\",\n  \"h2oVersion\": \"3.40.0.4\",\n  \"category\": \"Binomial\",\n  \"uuid\": \"model-uuid\",\n  \"supervised\": true,\n  \"nfeatures\": 2,\n  \"nclasses\": 2,\n  \"mojo_version\": 1.0,\n  \"instance\": {\n    \"feature1\": \"?\",\n    \"feature2\": \"?\"\n  }\n}\n```\n\n#### 3. Make Predictions\n\nSend prediction requests to the model:\n\n**Request:**\n```bash\ncurl -X POST http://localhost:8080/invocations \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"instances\": [\n      {\n        \"feature1\": \"value1\",\n        \"feature2\": 123.45\n      },\n      {\n        \"feature1\": \"value2\",\n        \"feature2\": 678.90\n      }\n    ]\n  }'\n```\n\n**Response Examples:**\n\nFor **binomial/multinomial classification**:\n```json\n{\n  \"predictions\": [\n    {\n      \"label\": \"class1\",\n      \"index\": 1,\n      \"class_probabilities\": [0.23, 0.77]\n    },\n    {\n      \"label\": \"class0\",\n      \"index\": 0,\n      \"class_probabilities\": [0.82, 0.18]\n    }\n  ]\n}\n```\n\nFor **regression**:\n```json\n{\n  \"predictions\": [\n    {\n      \"value\": 42.5\n    },\n    {\n      \"value\": 38.2\n    }\n  ]\n}\n```\n\n## Development\n\n### Running in Development Mode\n\nFor development with auto-reload:\n\n```bash\nmvn spring-boot:run\n```\n\n### Running Tests\n\nExecute the test suite:\n\n```bash\nmvn test\n```\n\n## License\n\nLicensed under the Apache License, Version 2.0. See the LICENSE file for details.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodelibs%2Ffione-serving","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodelibs%2Ffione-serving","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodelibs%2Ffione-serving/lists"}