{"id":20446372,"url":"https://github.com/ray-project/air-reference-arch","last_synced_at":"2025-10-25T18:44:51.760Z","repository":{"id":69926051,"uuid":"489126545","full_name":"ray-project/air-reference-arch","owner":"ray-project","description":null,"archived":false,"fork":false,"pushed_at":"2022-05-24T19:47:03.000Z","size":30120,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-13T00:45:32.818Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Jupyter Notebook","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/ray-project.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,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-05-05T21:09:09.000Z","updated_at":"2024-12-13T18:24:32.000Z","dependencies_parsed_at":"2023-05-11T05:15:25.159Z","dependency_job_id":null,"html_url":"https://github.com/ray-project/air-reference-arch","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ray-project/air-reference-arch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ray-project%2Fair-reference-arch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ray-project%2Fair-reference-arch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ray-project%2Fair-reference-arch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ray-project%2Fair-reference-arch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ray-project","download_url":"https://codeload.github.com/ray-project/air-reference-arch/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ray-project%2Fair-reference-arch/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279043436,"owners_count":26091457,"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","status":"online","status_checked_at":"2025-10-15T02:00:07.814Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-11-15T10:19:44.673Z","updated_at":"2025-10-15T03:35:16.226Z","avatar_url":"https://github.com/ray-project.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Reference architecture with best of breed OSS ML tools running on top of Ray AIR. \n# Feast \u0026 Ray \n\nThis reference architecture contains an end to end example illustrating the following components.\n- Ray AIR for scalable AI Runtime. (Data preprocessing, Train,Tune and batch)\n- Feast for feature store\n- Ray Serve for scalable, composable and framework agnostic ML model serving compute\n\n\n## Overview\n\nThis tutorial demonstrates the use of best of breed ML tools as part of a real-time credit scoring application. It uses the feast on AWS example as a starting point.\n* The primary training dataset is a loan table. This table contains historic loan data with accompanying features. The dataset also contains a target variable, namely whether a user has defaulted on their loan.\n* We will be using the `run.py` to fetch the features from feast and train a scalable xgboost model using Ray. We do a simple test to make sure our model works as intended.\n* We will then use a notebook to deploy a multi-step Ray Serve model endpoint to demonstrate how we can integrate retrieving online features using feast and decoupling those tasks for granular resources allocations and scaling.\n\nThe whole end to end reference implementation can be run on your laptop or in a collab notebook.\n\n\n\n## Setup\n### Setting up the environment\n`conda create -n ray-demo python==3.8 pip`\n\u003cbr\u003e\n`conda activate ray-demo`\n\u003cbr\u003e\n`pip install -r requirements.txt`\n\u003cbr\u003e\n### Setting up Feast locally\n\n\n### Setting up Feast\n\nWe have already set up a feature repository in [feature_repo/](feature_repo/). It isn't necessary to create a new\nfeature repository, but it can be done using the following command\n```\nfeast init -t local feature_repo # Command only shown for reference.\n```\n\nSince we don't need to `init` a new repository, all we have to do is configure the \n[feature_store.yaml/](feature_repo/feature_store.yaml) in the feature repository. This file has been configured to be running feast locally.\n\nDeploy the feature store by running `apply` from within the `feature_repo/` folder\n```\ncd feature_repo/\nfeast apply\n```\n```\nRegistered entity dob_ssn\nRegistered entity zipcode\nRegistered feature view credit_history\nRegistered feature view zipcode_features\nDeploying infrastructure for credit_history\nDeploying infrastructure for zipcode_features\n```\n\nNext we load features into the online store using the `materialize-incremental` command. This command will load the\nlatest feature values from a data source into the online store.\n\n```\nCURRENT_TIME=$(date -u +\"%Y-%m-%dT%H:%M:%S\")\nfeast materialize-incremental $CURRENT_TIME\n```\n\nReturn to the root of the repository\n```\ncd ..\n```\n\n## Training our credit card model example.\n\nFinally, we run the `run.py` script to train the model using a combination of loan data from our offline feature store and our zipcode, and then we test online inference by reading those same features from the online store.\n\nNote that there are two scripts providing two levels of abstractions.\n\n`run.py` provides the highest level of abstraction and allow a ML practictioner to iterate quickly without having to know the underlying tools, framework and infrastructure.\n\n`credit_model.py` includes the CreditScoringModel() class and all the functions integrated with ray and feast.\n\nLet's run our python run.py\n```\nThe script should then output the result of a single loan application\n```\nloan rejected!\n```\nWe are now ready to create our Ray Serve services using the jupyter notebook.\n\nOpen the notebook and follow the instructions.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fray-project%2Fair-reference-arch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fray-project%2Fair-reference-arch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fray-project%2Fair-reference-arch/lists"}