Skip to content

[SPARK-51947] Spark connect model cache offloading #50752

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

Open
wants to merge 19 commits into
base: master
Choose a base branch
from

Conversation

WeichenXu123
Copy link
Contributor

What changes were proposed in this pull request?

Support offloading model cache to spark driver local disk

Why are the changes needed?

Motivation: this feature helps to reduce spark driver memory pressure.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Manually.

Was this patch authored or co-authored using generative AI tooling?

No.

Signed-off-by: Weichen Xu <[email protected]>
Signed-off-by: Weichen Xu <[email protected]>
Signed-off-by: Weichen Xu <[email protected]>
Signed-off-by: Weichen Xu <[email protected]>
Signed-off-by: Weichen Xu <[email protected]>
Signed-off-by: Weichen Xu <[email protected]>
Signed-off-by: Weichen Xu <[email protected]>
Signed-off-by: Weichen Xu <[email protected]>
Signed-off-by: Weichen Xu <[email protected]>
Signed-off-by: Weichen Xu <[email protected]>
Signed-off-by: Weichen Xu <[email protected]>
@WeichenXu123 WeichenXu123 changed the title [WIP][SPARK-51947] Spark connect model cache offloading [SPARK-51947] Spark connect model cache offloading May 1, 2025
@WeichenXu123 WeichenXu123 requested a review from zhengruifeng May 1, 2025 06:36
.build[String, CacheItem]()
.asMap()
} else {
new ConcurrentHashMap[String, CacheItem]()
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you think it is risky that mlcache has no memory limit when offloading is disabled? Probably it makes sense to keep the old behaviour in this case: mlcache also has memory limit and retention time when offloading is disabled, but once a model is evicted, future access to it will throw an error CACHE_INVALID. WDYT?

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