Skip to content
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

Spike: Python Decorators for SmartRedis #279

Open
ashao opened this issue Oct 12, 2022 · 0 comments
Open

Spike: Python Decorators for SmartRedis #279

ashao opened this issue Oct 12, 2022 · 0 comments
Labels
type: feature Issues that include feature request or feature idea

Comments

@ashao
Copy link
Collaborator

ashao commented Oct 12, 2022

Description

Python decorators can be used to add functionality to existing workflows with minimal code changes. One idea submitted by a potential SmartSim user is to provide a cache decorator which would essentially allow the result of a Python evaluation to be stored into the database. There are likely a number of similar types of operations that we could likely provide.

Justification

Both users with existing Python workflows or those creating new ones can take advantage of the datastore provided by the orchestrator in a potentially simpler/cleaner way and can also help with key management. For example, with the aforementioned cache decorator, one could quickly wrap a numpy or scipy function to put the result in the database. Similar decorators might also simplify the creation/transformation of SmartRedis datasets (for example, if the metadata is known a priori).

Implementation Strategy

  • A survey should be done of users and developers to understand what decorators would be useful broadly across workflows
  • Capture any performance or side-effects that might arise from the use of these decorators (e.g. inadvertent overwrites of keys, maybe allow for asynchronous communication with the database)
  • Implement a subset of the decorators
@ashao ashao added the type: feature Issues that include feature request or feature idea label Oct 12, 2022
@billschereriii billschereriii changed the title Python Decorators for SmartRedis Spike: Python Decorators for SmartRedis Dec 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature Issues that include feature request or feature idea
Projects
None yet
Development

No branches or pull requests

1 participant