Skip to content

Fix SampleDataset cache cleanup - #1228

Open
DarylOkeke wants to merge 1 commit into
sunlabuiuc:masterfrom
DarylOkeke:codex/fix-sample-dataset-close-cache
Open

Fix SampleDataset cache cleanup#1228
DarylOkeke wants to merge 1 commit into
sunlabuiuc:masterfrom
DarylOkeke:codex/fix-sample-dataset-close-cache

Conversation

@DarylOkeke

Copy link
Copy Markdown
Contributor

Closing a SampleDataset could delete reusable task cache files. This tracks whether the dataset owns its directory, so close() only removes temporary data and keeps persistent or shared caches intact.

@fbonc

fbonc commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

in tests/core/test_caching.py:172, the test suite fails cause this test still expects the processed sample cache from BaseDataset.set_task() to be deleted when its context exits.

this PR intentionally preserves that reusable cache, so index.json and schema.pkl still exist. fix is to update these assertions to expect both files to remain.

@fbonc

fbonc commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

otherwise looks good.

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.

2 participants