Skip to content

Cache split infromation for TPESampler#6128

Closed
fusawa-yugo wants to merge 2 commits intooptuna:masterfrom
fusawa-yugo:fusawa-yugo/split-cache
Closed

Cache split infromation for TPESampler#6128
fusawa-yugo wants to merge 2 commits intooptuna:masterfrom
fusawa-yugo:fusawa-yugo/split-cache

Conversation

@fusawa-yugo
Copy link
Copy Markdown
Contributor

Motivation

This is a revival of #5464.
In the current implementation, _split_cache is unnecessarily repeated even when the results would be identical.
This PR aims to eliminate such redundant computations and improve efficiency.

Description of the changes

The content is same as #5464 for now.
The cache uses trial.number as the key, and the value is the result of the split operation.

@fusawa-yugo fusawa-yugo marked this pull request as draft June 4, 2025 09:50
@fusawa-yugo
Copy link
Copy Markdown
Contributor Author

I have a question.
Are there any issues with storing the cache in system_attrs of Study?
I feel that storing cache as an attribute of the Study would be more semantically appropriate.

@codecov
Copy link
Copy Markdown

codecov bot commented Jun 4, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.43%. Comparing base (440d03a) to head (329dcdf).
⚠️ Report is 885 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6128      +/-   ##
==========================================
+ Coverage   88.39%   88.43%   +0.04%     
==========================================
  Files         207      207              
  Lines       14036    14051      +15     
==========================================
+ Hits        12407    12426      +19     
+ Misses       1629     1625       -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@github-actions
Copy link
Copy Markdown
Contributor

This pull request has not seen any recent activity.

@github-actions github-actions bot added stale Exempt from stale bot labeling. and removed stale Exempt from stale bot labeling. labels Jun 11, 2025
@nabenabe0928 nabenabe0928 changed the title Cache split infromation for TPE sampler. Cache split infromation for TPESampler Jun 19, 2025
@github-actions
Copy link
Copy Markdown
Contributor

This pull request has not seen any recent activity.

@github-actions github-actions bot added the stale Exempt from stale bot labeling. label Jun 26, 2025
@nabenabe0928
Copy link
Copy Markdown
Contributor

I noticed a concern, so let me leave a note here:

In principle, this PR should speed up TPESampler in many cases, but it could also have a negative impact.
One example happens in combination with RDBStorage due to the exceed max string length error.
We probably need to consider an option to deactivate this caching feature if the RDBStorage does not allow us to cache a long string.

@github-actions github-actions bot removed the stale Exempt from stale bot labeling. label Jun 29, 2025
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jul 7, 2025

This pull request has not seen any recent activity.

@github-actions github-actions bot added stale Exempt from stale bot labeling. and removed stale Exempt from stale bot labeling. labels Jul 7, 2025
@github-actions
Copy link
Copy Markdown
Contributor

This pull request has not seen any recent activity.

@github-actions github-actions bot added the stale Exempt from stale bot labeling. label Jul 16, 2025
@github-actions
Copy link
Copy Markdown
Contributor

This pull request was closed automatically because it had not seen any recent activity. If you want to discuss it, you can reopen it freely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale Exempt from stale bot labeling.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants