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 parameters to benchmark functions as Events/Requests rather than Environment Variables #379

Open
alannair opened this issue Nov 29, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@alannair
Copy link
Collaborator

In some of the benchmarks, parameters are passed to functions as environment variables but it would have made more sense if they were given as event/request parameters.

For instance, in map-reduce, NUM_MAPPERS (the number of mappers) and NUM_REDUCERS (the number of reducers) are set via environment variables. This creates a problem - on cloud platforms like AWS Lambda, a single set of environment variables is configured for a function. So, say, if I need to invoke the map-reduce function twice - one invocation with 4 mappers, and another with 8 mappers - I cannot send the invocations simultaneously. I would have to configure the environment variables on the cloud host (NUM_MAPPERS=4) and send the first invocation, then re-configure the environment variables (NUM_MAPPERS=8) and then send the second invocation.
In the case of locally hosted functions, I can make the invocations simultaneously, but I would need to open two separate shell sessions (one with NUM_MAPPERS set to 4, another one with it set to 8) to make the invocations.
The above problem can be solved if such parameters were fed to the function as parameters in the event request, rather than as environment variables.

Similar is the case for many parameters in stacking-training such as BUCKET_NAME (name of the s3 bucket to use), NumTrainers (number of trainer functions to invoke) and CONCURRENT_TRAINING (whether to run the trainers serially or concurrently).

What I propose is: we identify which parameters are request-specific, rather than function-specific. The function-specific parameters can be configured through environment variables, while the request-specific ones can be passed through event requests.

@alannair alannair added the enhancement New feature or request label Nov 29, 2022
@alannair
Copy link
Collaborator Author

@dhschall @ustiugov @shyamjesal Making this enhancement would be easy enough. Should I work on this?

@ustiugov
Copy link
Member

ustiugov commented Dec 2, 2022

@alannair I like this idea. please go ahead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants