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

修正: 対応デバイスモックの属性不足を修正 #1224

Merged
merged 1 commit into from
May 14, 2024

Conversation

tarepan
Copy link
Contributor

@tarepan tarepan commented May 11, 2024

内容

概要: 対応デバイスモックの属性不足を修正

コアの対応デバイス一覧である SupportedDevicesInfo は 3 属性全てが required である。

class SupportedDevicesInfo(BaseModel):
"""
対応しているデバイスの情報
"""
cpu: bool = Field(title="CPUに対応しているか")
cuda: bool = Field(title="CUDA(Nvidia GPU)に対応しているか")
dml: bool = Field(title="DirectML(Nvidia GPU/Radeon GPU等)に対応しているか")

このインスタンスはコア由来の supported_devices 文字列をパースして生成されている。ゆえに supported_devices 文字列は 3 属性の json 文字列となっていなければならない。
しかし現状のモックは属性が欠けているケースがあり、不正なモックとなっている。

このような背景から、対応デバイスモックの属性不足を修正することを提案します。

関連 Issue

無し

@tarepan tarepan added the バグ label May 11, 2024
@tarepan tarepan requested a review from a team as a code owner May 11, 2024 05:08
@tarepan tarepan requested review from Hiroshiba and removed request for a team May 11, 2024 05:08
@tarepan tarepan added the 優先度:中 重要 label May 12, 2024
Copy link
Member

@Hiroshiba Hiroshiba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!!

…そうか、この辺りはstringでやり取りしてるんですね…。
ちゃんとModel化してあげると型がついてバグりにくいコードにできるかもですね。
今ならe2eテストで同一判定してるから異常あればわかりそうですし!!

@Hiroshiba Hiroshiba merged commit 418a9d3 into VOICEVOX:master May 14, 2024
3 checks passed
@tarepan tarepan deleted the fix/core_version_mock branch May 14, 2024 06:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants