Skip to content

Fix caching offers with GPU requirements#2210

Merged
jvstme merged 1 commit intomasterfrom
issue_2208_fix_offers_cache
Jan 23, 2025
Merged

Fix caching offers with GPU requirements#2210
jvstme merged 1 commit intomasterfrom
issue_2208_fix_offers_cache

Conversation

@jvstme
Copy link
Copy Markdown
Collaborator

@jvstme jvstme commented Jan 22, 2025

Use Requirements.json instead ofRequirements.dict+json.dumps, which fails on enums.

Also remove sort_keys=True, which seems to be redundant.

field order is preserved by .dict() and .json() etc.
https://docs.pydantic.dev/1.10/usage/models/#field-ordering

Fixes #2208

Use `Requirements.json` instead of
`Requirements.dict`+`json.dumps`, which fails on
enums.

Also remove `sort_keys=True`, which seems to be
redundant.

> field order is preserved by .dict() and .json()
> etc.
https://docs.pydantic.dev/1.10/usage/models/#field-ordering
@jvstme jvstme requested review from r4victor and un-def and removed request for r4victor January 22, 2025 21:41
@jvstme jvstme merged commit e47a3f2 into master Jan 23, 2025
@jvstme jvstme deleted the issue_2208_fix_offers_cache branch January 23, 2025 09:52
pranitnaik43 pushed a commit to bahaal-tech/dstack that referenced this pull request Feb 9, 2025
Use `Requirements.json` instead of
`Requirements.dict`+`json.dumps`, which fails on
enums.

Also remove `sort_keys=True`, which seems to be
redundant.

> field order is preserved by .dict() and .json()
> etc.
https://docs.pydantic.dev/1.10/usage/models/#field-ordering
pranitnaik43 pushed a commit to bahaal-tech/dstack that referenced this pull request Mar 4, 2025
Use `Requirements.json` instead of
`Requirements.dict`+`json.dumps`, which fails on
enums.

Also remove `sort_keys=True`, which seems to be
redundant.

> field order is preserved by .dict() and .json()
> etc.
https://docs.pydantic.dev/1.10/usage/models/#field-ordering
pranitnaik43 pushed a commit to bahaal-tech/dstack that referenced this pull request Mar 5, 2025
Use `Requirements.json` instead of
`Requirements.dict`+`json.dumps`, which fails on
enums.

Also remove `sort_keys=True`, which seems to be
redundant.

> field order is preserved by .dict() and .json()
> etc.
https://docs.pydantic.dev/1.10/usage/models/#field-ordering
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Cannot get cloud GPU offers

2 participants