Skip to content

Conversation

@gpauloski
Copy link
Collaborator

Description

Adds the populate_target flag to Store.proxy() and other proxy methods of the Store. This flag "pre-resolves" the created proxies which essentially just sets the __wrapped__ attribute of the proxy to reference the object that was proxied.

I've added this flag because a common pattern in apps using ProxyStore is to create a proxy then pass that proxy to some compute engine that serializes the proxy. Often, these serializers introspect the proxy in some way which incidentally resolves the proxy. "Pre-resolving" the proxy removes the overhead that is often unknown to the programmer, and also avoids some issues with double resolving when evict=True.

Fixes

Type of Change

  • Breaking Change (fix or enhancement which changes existing semantics of the public interface)
  • Enhancement (new features or improvements to existing functionality)
  • Bug (fixes for a bug or issue)
  • Internal (refactoring, style changes, testing, optimizations)
  • Documentation update (changes to documentation or examples)
  • Package (dependencies, versions, package metadata)
  • Development (CI workflows, pre-commit, linters, templates)
  • Security (security related changes)

Testing

Added new tests.

Pull Request Checklist

Please confirm the PR meets the following requirements.

  • Tags added to PR (e.g., breaking, bug, enhancement, internal, documentation, package, development, security).
  • Code changes pass pre-commit (e.g., mypy, ruff, etc.).
  • Tests have been added to show the fix is effective or that the new feature works.
  • New and existing unit tests pass locally with the changes.
  • Docs have been updated and reviewed if relevant.

@gpauloski gpauloski added the enhancement New features or improvements to existing functionality label Feb 26, 2024
@gpauloski gpauloski merged commit eac5093 into main Feb 26, 2024
@gpauloski gpauloski deleted the issue-499 branch February 26, 2024 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New features or improvements to existing functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add populate_target flag to Store.proxy() and other proxy methods

2 participants