From 32a988e72c8da2c297f517897fd83fa3c1dd6a47 Mon Sep 17 00:00:00 2001 From: Sudeep Pillai Date: Thu, 25 Jan 2024 08:16:01 -0800 Subject: [PATCH] Fix `asdict` dictionary conversion for `RuntimeEnv` --- nos/managers/model.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nos/managers/model.py b/nos/managers/model.py index 19c70889..e8e22dc2 100644 --- a/nos/managers/model.py +++ b/nos/managers/model.py @@ -3,7 +3,7 @@ import os import re from collections import OrderedDict -from dataclasses import asdict, dataclass, field +from dataclasses import dataclass, field from enum import Enum from pathlib import Path from typing import Any, Dict, Iterable, List, Union @@ -237,7 +237,7 @@ def _get_actor_options(cls, spec: ModelSpec, deployment: ModelDeploymentSpec) -> if spec.runtime_env is not None: logger.debug("Using custom runtime environment, this may take a while to build.") - actor_opts["runtime_env"] = RuntimeEnv(**asdict(spec.runtime_env)) + actor_opts["runtime_env"] = RuntimeEnv(**spec.runtime_env.model_dump()) logger.debug(f"Actor options [id={spec.id}, opts={actor_opts}]") return actor_opts