https://github.com/agnostiqhq/covalent-ec2-plugin
Executor plugin interfacing Covalent with Amazon EC2
Science Score: 39.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 2 DOI reference(s) in README -
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (13.4%) to scientific vocabulary
Keywords
Keywords from Contributors
Repository
Executor plugin interfacing Covalent with Amazon EC2
Basic Info
- Host: GitHub
- Owner: AgnostiqHQ
- License: apache-2.0
- Language: Python
- Default Branch: develop
- Homepage: https://agnostiq.ai/covalent
- Size: 396 KB
Statistics
- Stars: 8
- Watchers: 10
- Forks: 2
- Open Issues: 5
- Releases: 16
Topics
Metadata Files
README.md
Covalent EC2 Executor Plugin
Covalent is a Pythonic workflow tool used to execute tasks on advanced computing hardware.
This plugin allows tasks to be executed in an AWS EC2 instance (which is auto-created) when you execute your workflow with covalent.
1. Installation
To use this plugin with Covalent, simply install it using pip:
pip install covalent-ec2-plugin
2. Usage Example
This is a toy example of how a workflow can be adapted to utilize the EC2 Executor. Here we train a Support Vector Machine (SVM) and spin up an EC2 automatically to execute the train_svm electron. We also note we require DepsPip to install the dependencies on the EC2 instance.
```python from numpy.random import permutation from sklearn import svm, datasets import covalent as ct
deps_pip = ct.DepsPip( packages=["numpy==1.23.2", "scikit-learn==1.1.2"] )
executor = ct.executor.EC2Executor( instancetype="t2.micro", volumesize=8, #GiB sshkeyfile="~/.ssh/idrsa", keyname="key_name" # EC2 Key Pair )
Use executor plugin to train our SVM model.
@ct.electron( executor=executor, depspip=depspip ) def train_svm(data, C, gamma): X, y = data clf = svm.SVC(C=C, gamma=gamma) clf.fit(X[90:], y[90:]) return clf
@ct.electron def loaddata(): iris = datasets.loadiris() perm = permutation(iris.target.size) iris.data = iris.data[perm] iris.target = iris.target[perm] return iris.data, iris.target
@ct.electron def scoresvm(data, clf): Xtest, ytest = data return clf.score( Xtest[:90], y_test[:90] )
@ct.lattice def runexperiment(C=1.0, gamma=0.7): data = loaddata() clf = trainsvm( data=data, C=C, gamma=gamma ) score = scoresvm( data=data, clf=clf ) return score
Dispatch the workflow
dispatchid = ct.dispatch(runexperiment)( C=1.0, gamma=0.7 )
Wait for our result and get result value
result = ct.getresult(dispatchid=dispatch_id, wait=True).result
print(result) ```
During the execution of the workflow one can navigate to the UI to see the status of the workflow, once completed however the above script should also output a value with the score of our model.
0.8666666666666667
3. Configuration
There are many configuration options that can be passed in to the class ct.executor.EC2Executor or by modifying the covalent config file under the section [executors.ec2]
For more information about all of the possible configuration values visit our read the docs (RTD) guide for this plugin.
4. Required AWS Resources
In order to run your workflows with covalent there are a few notable resources that need to be provisioned first.
For more information regarding which cloud resources need to be provisioned visit our read the docs (RTD) guide for this plugin.
The required resources include an EC2 Key Pair (which corresponds to the key_name config value), and optionally a VPC & Subnet that can be used instead of the EC2 executor automatically creating it.
Getting Started with Covalent
For more information on how to get started with Covalent, check out the project homepage and the official documentation.
Release Notes
Release notes for this plugin are available in the Changelog.
Citation
Please use the following citation in any publications:
W. J. Cunningham, S. K. Radha, F. Hasan, J. Kanem, S. W. Neagle, and S. Sanand. Covalent. Zenodo, 2022. https://doi.org/10.5281/zenodo.5903364
License
Covalent is licensed under the Apache License 2.0. See the LICENSE file or contact the support team for more details.
Owner
- Name: Agnostiq
- Login: AgnostiqHQ
- Kind: organization
- Email: contact@agnostiq.ai
- Location: Toronto
- Website: https://agnostiq.ai
- Twitter: AgnostiqHQ
- Repositories: 37
- Profile: https://github.com/AgnostiqHQ
Developing Software for Advanced Computing
GitHub Events
Total
- Delete event: 2
- Issue comment event: 3
- Push event: 5
- Pull request review event: 1
- Pull request event: 2
- Create event: 2
Last Year
- Delete event: 2
- Issue comment event: 3
- Push event: 5
- Pull request review event: 1
- Pull request event: 2
- Create event: 2
Committers
Last synced: 10 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Okechukwu Ochia | e****d@g****m | 36 |
| CovalentOpsBot | c****t | 18 |
| Alejandro Esquivel | ae@a****d | 13 |
| Will Cunningham | w****l@a****i | 12 |
| Faiyaz Hasan | f****z@a****i | 6 |
| Sankalp Sanand | s****p@a****i | 5 |
| dependabot[bot] | 4****] | 3 |
| mpvgithub | 1****b | 2 |
| Venkat Bala | 1****a | 2 |
| pre-commit-ci[bot] | 6****] | 1 |
| WingCode | s****4@g****m | 1 |
| Scott Wyman Neagle | w****a@p****m | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 12
- Total pull requests: 50
- Average time to close issues: 20 days
- Average time to close pull requests: 2 months
- Total issue authors: 5
- Total pull request authors: 11
- Average comments per issue: 0.17
- Average comments per pull request: 0.4
- Merged pull requests: 37
- Bot issues: 0
- Bot pull requests: 12
Past Year
- Issues: 0
- Pull requests: 2
- Average time to close issues: N/A
- Average time to close pull requests: 5 minutes
- Issue authors: 0
- Pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 0.0
- Merged pull requests: 1
- Bot issues: 0
- Bot pull requests: 2
Top Authors
Issue Authors
- AlejandroEsquivel (7)
- FyzHsn (2)
- cjao (1)
- kessler-frost (1)
- Emmanuel289 (1)
Pull Request Authors
- AlejandroEsquivel (13)
- dependabot[bot] (8)
- Emmanuel289 (6)
- FyzHsn (6)
- mpvgithub (4)
- pre-commit-ci[bot] (4)
- kessler-frost (3)
- venkatBala (2)
- wjcunningham7 (2)
- WingCode (1)
- scottwn (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 42 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 19
- Total maintainers: 1
pypi.org: covalent-ec2-plugin
Covalent EC2 Plugin
- Homepage: https://github.com/AgnostiqHQ/covalent-ec2-plugin
- Documentation: https://covalent-ec2-plugin.readthedocs.io/
- License: Apache License 2.0
-
Latest release: 0.13.2
published over 2 years ago
Rankings
Maintainers (1)
Dependencies
- covalent-ssh-plugin ==0.9.0
- flake8 ==3.9.2 test
- isort ==5.7.0 test
- mock ==4.0.3 test
- nbconvert ==6.3.0 test
- pre-commit ==2.13.0 test
- pytest ==6.2.5 test
- pytest-asyncio ==0.18.3 test
- pytest-cov ==2.12.0 test
- pytest-mock ==3.6.1 test
- EndBug/add-and-commit v9 composite
- actions/checkout v3 composite
- actions/checkout master composite
- peterjgrainger/action-changelog-reminder v1.3.0 composite
- actions/checkout v3 composite
- pilosus/action-pip-license-checker main composite
- actions/checkout v2 composite
- actions/setup-python v2 composite
- ncipollo/release-action v1 composite
- actions-ecosystem/action-get-latest-tag v1 composite
- actions/checkout v3 composite
- actions/setup-python v2 composite
- AgnostiqHQ/covalent/.github/actions/version develop composite
- actions/checkout v3 composite
- numpy ==1.22.4 test
- python-dotenv ==0.21.0 test
- scikit-learn ==1.1.2 test
- tornado ==6.0.3 test