https://github.com/agnostiqhq/covalent-gcpbatch-plugin
Executor plugin interfacing Covalent with GCP Batch
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 (10.4%) to scientific vocabulary
Keywords
Keywords from Contributors
Repository
Executor plugin interfacing Covalent with GCP Batch
Basic Info
- Host: GitHub
- Owner: AgnostiqHQ
- License: apache-2.0
- Language: Python
- Default Branch: develop
- Homepage: https://agnostiq.ai/covalent
- Size: 447 KB
Statistics
- Stars: 2
- Watchers: 8
- Forks: 3
- Open Issues: 14
- Releases: 7
Topics
Metadata Files
README.md
Covalent Google Cloud Platform (GCP) Batch Plugin
Covalent is a Pythonic workflow tool used to execute tasks on advanced computing hardware. This executor plugin interfaces Covalent with GCP Batch.
1. Installation
To use this plugin with Covalent, install it using pip:
sh
pip install covalent-gcpbatch-plugin
2. Usage Example
This is an example of how a workflow can be constructed to use the GCP Batch executor. In the example, we train a Support Vector Machine (SVM) and use an instance of the executor to execute the train_svm electron. Note that we also require DepsPip which will be required to execute the electrons.
```python from numpy.random import permutation from sklearn import svm, datasets import covalent as ct
deps_pip = ct.DepsPip( packages=["numpy==1.22.4", "scikit-learn==1.1.2"] )
executor = ct.executor.GCPBatchExecutor( projectid='covalentgcpbatch', region='us-east1', bucketname='covalent-storage-bucket', containerimageuri='us-east1-docker.pkg.dev/covalentgcpbatch/covalent/covalent-gcpbatch-executor', serviceaccountemail='covalentsaaccount@covalenttesting.iam.gserviceaccount.com', vcpus = 2, # Number of vCPUs to allocate memory = 512, # Memory in MB to allocate timelimit = 300, # Time limit of job in seconds poll_freq = 3, # Number of seconds to pause before polling for the job's status )
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 ) return scoresvm( data=data, clf=clf )
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, 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, the above script should also output a value with the score of our model.
sh
0.8666666666666667
In order for the above workflow to run successfully, one has to provision the required cloud resources as mentioned in the section Required GCP Batch Resources.
3. Configuration
There are many configuration options that can be passed in to the class ct.executor.GCPBatchExecutor or by modifying the covalent config file under the section [executors.gcpbatch].
For more information about all of the possible configuration values visit our read the docs (RTD) guide for this plugin.
4. Required GCP Resources
In order to run your workflows with covalent there are a few notable GCP resources that need to be provisioned first. The required resources are Google storage bucket, docker artifact registry and service account.
For more information regarding which cloud resources need to be provisioned visit our read the docs (RTD) guide for this plugin.
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 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: 1
- Issue comment event: 1
- Push event: 6
- Pull request event: 3
- Fork event: 1
- Create event: 3
Last Year
- Delete event: 1
- Issue comment event: 1
- Push event: 6
- Pull request event: 3
- Fork event: 1
- Create event: 3
Committers
Last synced: over 1 year ago
Top Committers
| Name | Commits | |
|---|---|---|
| Faiyaz Hasan | f****z@a****i | 45 |
| Alejandro Esquivel | ae@a****d | 37 |
| Venkat Bala | v****t@a****i | 26 |
| Venkat Bala | b****9@g****m | 21 |
| CovalentOpsBot | c****t | 14 |
| mpvgithub | 1****b | 2 |
| Sankalp Sanand | s****p@a****i | 1 |
| Ara Ghukasyan | 3****s | 1 |
| Will Cunningham | w****7 | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 15
- Total pull requests: 28
- Average time to close issues: about 2 months
- Average time to close pull requests: about 1 month
- Total issue authors: 4
- Total pull request authors: 10
- Average comments per issue: 0.2
- Average comments per pull request: 1.07
- Merged pull requests: 18
- Bot issues: 0
- Bot pull requests: 9
Past Year
- Issues: 0
- Pull requests: 5
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 0.0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 5
Top Authors
Issue Authors
- AlejandroEsquivel (9)
- araghukas (3)
- kessler-frost (1)
- santoshkumarradha (1)
Pull Request Authors
- dependabot[bot] (9)
- FyzHsn (7)
- AlejandroEsquivel (4)
- venkatBala (2)
- araghukas (1)
- mpvgithub (1)
- kessler-frost (1)
- pre-commit-ci[bot] (1)
- wjcunningham7 (1)
- dhroth (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 21 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 10
- Total maintainers: 1
pypi.org: covalent-gcpbatch-plugin
Covalent GCP Batch Plugin
- Homepage: https://github.com/AgnostiqHQ/covalent-gcpbatch-plugin
- Documentation: https://covalent-gcpbatch-plugin.readthedocs.io/
- License: Apache License 2.0
-
Latest release: 0.15.0
published about 2 years ago