adding dotenv for credentials management

This commit is contained in:
Goku Mohandas
2023-09-15 09:44:38 -07:00
parent 0133795963
commit 097ffaadc8
9 changed files with 1713 additions and 1792 deletions

View File

@@ -1,4 +1,5 @@
import argparse
import os
from http import HTTPStatus
from typing import Dict
@@ -75,5 +76,5 @@ if __name__ == "__main__":
parser.add_argument("--run_id", help="run ID to use for serving.")
parser.add_argument("--threshold", type=float, default=0.9, help="threshold for `other` class.")
args = parser.parse_args()
ray.init()
ray.init(runtime_env={"env_vars": {"GITHUB_USERNAME": os.environ["GITHUB_USERNAME"]}})
serve.run(ModelDeployment.bind(run_id=args.run_id, threshold=args.threshold))