-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: updated the documentation. (#146)
* feat: add continous integration * chore: add workflow_dispatch * fix: fixed the dependencies installation step * fix: fixed the requirements file * test: fixed the cost_calculator test * chore: update ci and added cd * chore: added commitizen to automatically bump versions * chore: changed config schema form file to dict * chore: added interractions workflow * docs: Updated the documentation to meet the new changes * fix: fixed the README * style: linting setup file * Delete benchmarks/README.md * minor changes to the main README --------- Co-authored-by: Arshia Moghimi <arshiamoghimi98@gmail.com> Co-authored-by: Mohammad Shahrad <engshahrad@users.noreply.github.com>
- Loading branch information
1 parent
b70c9cc
commit 6b53c6c
Showing
7 changed files
with
164 additions
and
48 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# Welcome to Parrotfish contributing guide <!-- omit in toc --> | ||
|
||
Thank you for investing your time in contributing to our project! :sparkles:. | ||
|
||
## New contributor guide | ||
|
||
To get an overview of the project, read the [README](README.md). Here are some resources to help you get started: | ||
|
||
- [Set up Git](https://docs.github.com/en/get-started/quickstart/set-up-git) | ||
- [GitHub flow](https://docs.github.com/en/get-started/quickstart/github-flow) | ||
- [Collaborating with pull requests](https://docs.github.com/en/github/collaborating-with-pull-requests) | ||
- [AWS Lambda Documentation](https://docs.aws.amazon.com/lambda/latest/dg/welcome.html) | ||
- [Google Cloud Function](https://cloud.google.com/functions/docs) | ||
|
||
|
||
## Getting started | ||
|
||
### Steps to run parrotfish while making changes: | ||
1. Create and activate a virtualenv. | ||
```bash | ||
python3 -m venv src-env | ||
source src-env/bin/activate | ||
``` | ||
|
||
2. Install required packages. | ||
```bash | ||
pip install -r requirements.txt -r requirements-dev.txt | ||
``` | ||
|
||
3. Install Parrotfish as an editable package. | ||
```bash | ||
export PACKAGE_VERSION="dev" | ||
pip install -e . | ||
``` | ||
|
||
4. Run it! | ||
```bash | ||
parrotfish -h | ||
``` | ||
|
||
## Running tests: | ||
```bash | ||
pytest -v --cov | ||
``` | ||
|
||
## Versioning: | ||
We use [commitizen](https://commitizen-tools.github.io/commitizen/) to generate the CHANGELOG.md, bump the version and create a tag. | ||
|
||
### Configuring commitizen: | ||
```bash | ||
cz init | ||
``` | ||
|
||
### Bump version: | ||
```bash | ||
cz bump | ||
``` | ||
A tag is created with the new version. When you push this tag a packaging pipeline will be triggered which will create | ||
a release, package the parrotfish tool and attaches that as an asset to the release. |
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"commitizen": { | ||
"name": "cz_conventional_commits", | ||
"tag_format": "$version", | ||
"version_scheme": "semver", | ||
"version": "0.0.1", | ||
"update_changelog_on_bump": true | ||
} | ||
} |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
# Parrotfish configuration file: | ||
|
||
## Basic Configuration: | ||
|
||
``` | ||
{ | ||
"function_name": The serverless function's name (Required), | ||
"vendor": The cloud provider "AWS" or "GCP" (Required), | ||
"region": The serverless function's region (Required), | ||
"payload": Payload to invoke the serverless function with (Required if payloads attribute not provided), | ||
"payloads": [ | ||
{ | ||
"payload": Payload to invoke the serverless function with (Required), | ||
"weight": Impact of the exploration with this payload over the weighted average cost. (Required and Should be in [0, 1]), | ||
"execution_time_threshold": The execution time threshold constraint. We leverages the execution time model to recommend a configuration | ||
that minimizes cost while adhering to the specified execution time constraint. (Optional), | ||
}... | ||
] (Constraint: sum of weights must be equal to 1!), | ||
} | ||
``` | ||
|
||
## Advanced configuration: | ||
``` | ||
{ | ||
... | ||
"memory_bounds": Array containing two memory values that represent the memory configuration bounds (Optional), | ||
"termination_threshold": When the knowledge value for the optimal memory configuration reaches this threshold the recommendation algorithm terminates. (Optional), | ||
"max_sample_count": The maximum size of the sample. (Optional), | ||
"number_invocations": The minimum number of invocations per iteration. (Optional), | ||
"dynamic_sampling_params": { | ||
"max_sample_count": The maximum number of samples we gather through dynamically, | ||
"coefficient_of_variation_threshold": When sample dynamically until we find a consistant enough. Consistency is measured by the coefficient of variation, | ||
and when the calculated coefficient of variation reaches this threshold we terminate the dynamic sampling, | ||
} (Optional), | ||
"max_number_of_invocation_attempts": The maximum number of attempts per invocation when this number is reached an error is raised. (Optional) | ||
"execution_time_threshold": The execution time threshold constraint. We leverages the execution time model to recommend a configuration that minimizes cost while adhering to the specified | ||
execution time constraint. In case of multiple payloads this value will be applied to all the payloads if no execution_time_threshold attribute is present. | ||
} | ||
``` | ||
|
||
|
||
## Example single payload: | ||
```json | ||
{ | ||
"function_name": "example_function", | ||
"vendor": "AWS", | ||
"region": "example_region", | ||
"payload": "payload" | ||
} | ||
``` | ||
|
||
## Example multiple payloads: | ||
```json | ||
{ | ||
"function_name": "example_function", | ||
"vendor": "AWS", | ||
"region": "example_region", | ||
"payloads": [ | ||
{ | ||
"payload": "payload", | ||
"weight": 0.3 | ||
}, | ||
{ | ||
"payload": "payload", | ||
"weight": 0.7 | ||
} | ||
] | ||
} | ||
``` |
This file contains 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