Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typo fix: correct gpu flag "preferred" #38

Merged
merged 13 commits into from
Sep 28, 2023
12 changes: 6 additions & 6 deletions agent/worker/task_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@


class GPUFlag(Enum):
preffered: str = "preffered"
preferred: str = "preferred"
required: str = "required"
skipped: str = "skipped"

Expand All @@ -68,8 +68,8 @@ def from_config(cls, config: dict) -> GPUFlag:

@classmethod
def from_str(cls, config_val: Optional[str]) -> GPUFlag:
if config_val == "preffered":
return GPUFlag.preffered
if config_val == "preferred":
return GPUFlag.preferred
elif config_val == "required":
return GPUFlag.required
elif config_val is None:
Expand Down Expand Up @@ -227,7 +227,7 @@ def init_docker_image(self):
raise RuntimeError(
f"Runtime {nvidia} required to run the application, but it's not found in docker info."
)
elif gpu is GPUFlag.preffered:
elif gpu is GPUFlag.preferred:
self.logger.warn(
(
f"Runtime {nvidia} not found in docker info, GPU features will be unavailable."
Expand Down Expand Up @@ -463,7 +463,7 @@ def find_or_run_container(self):
if (
is_runtime_err
and (self.docker_runtime == "nvidia")
and (self._gpu_config is GPUFlag.preffered)
and (self._gpu_config is GPUFlag.preferred)
):
self.logger.warn("Can't start docker container. Trying to use another runtime.")
self.docker_runtime = "runc"
Expand Down Expand Up @@ -492,7 +492,7 @@ def find_or_run_container(self):
"Error while trying to start the container "
f"with runtime={orig_runtime}. "
"Check your nvidia drivers, delete gpu flag from application config "
"or reaplace it with gpu=`preffered`. "
"or reaplace it with gpu=`preferred`. "
f"Docker exception message: {clear_msg}"
)
)
Expand Down