Add backend routing, transform caching, and sklearn estimator caching#9
Open
Add backend routing, transform caching, and sklearn estimator caching#9
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR makes iTuna significantly smoother for large iterative workflows:
Backend routing
You can now route different operations to different backends, matching how users actually run experiments:
Transform caching
ConsistencyTransform.fitis now cached in disk-cache workflows, so consistency alignment is never recomputed for identical inputs. The distributed backend also uses a local fast-path when all requested models are already cached, skipping redundant sweep registration.sklearn estimator caching (
ituna.sklearn)New module for caching standalone sklearn estimators outside of
ConsistencyEnsemble:Patched estimators pass sklearn compliance checks (
check_estimator).Changes
ituna/config.py:register_backend_route,remove_backend_route,clear_backend_routes,resolve_backend_routeituna/_backends/: lazy backend resolution per operation; disk-cache transform fit caching; distributed fast-path for fully cached rerunsituna/sklearn.py: new module —cached(),enable_global_cache(),disable_global_cache(),get_global_cache_status()ituna/_cache_guard.py: recursion guard preventing double-caching when patched estimators are used inside ensemblestest_backend_routing.py,test_sklearn_cache_wrapper.py, updated disk-cache and distributed tests