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

Passing in a function as the work function feature #39

Open
Jonah1234567 opened this issue Jun 9, 2022 · 0 comments
Open

Passing in a function as the work function feature #39

Jonah1234567 opened this issue Jun 9, 2022 · 0 comments
Labels
dcp Relates to DCP or the Compute API enhancement New feature or request python Relates to Python code

Comments

@Jonah1234567
Copy link

Having a feature in which users can pass a function to compute_for and have that function be used as the work function would be a powerful feature. For instance if a user had a machine learning function that performs inferences based off of some arbitrary arguments, allowing to the user to pass in that function with no modification as the new work function would provide powerful functionality.

In this case the user's function might look like something:
def inference(input_data, model, hyperparameters):

The user can then pass that function to compute_for and with some type of argument in the compute_for specify what arguments from inference are sliceable and which are shared_args
job = dcp.compute_for(inference, slice = input_data, shared_args = hyperparameter)

I think this would be a powerful tool especially for newer and more casual bifrost users but more thought should be put into what this solution looks like.

@ccmcintyre-kingsds ccmcintyre-kingsds added enhancement New feature or request dcp Relates to DCP or the Compute API python Relates to Python code labels Jun 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dcp Relates to DCP or the Compute API enhancement New feature or request python Relates to Python code
Projects
None yet
Development

No branches or pull requests

2 participants