https://github.com/agnostiqhq/covalent-azurebatch-plugin

Executor plugin interfacing Covalent with Azure Batch

https://github.com/agnostiqhq/covalent-azurebatch-plugin

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.0%) to scientific vocabulary

Keywords

batch cloud-computing covalent microsoft-azure python python3 quantum-computing

Keywords from Contributors

data-pipeline hpc-applications machinelearning-python orchestration parallelization pipelines quantum quantum-machine-learning workflow-automation workflow-management
Last synced: 5 months ago · JSON representation

Repository

Executor plugin interfacing Covalent with Azure Batch

Basic Info
  • Host: GitHub
  • Owner: AgnostiqHQ
  • License: apache-2.0
  • Language: Python
  • Default Branch: develop
  • Homepage: https://covalent.xyz
  • Size: 148 KB
Statistics
  • Stars: 4
  • Watchers: 10
  • Forks: 0
  • Open Issues: 9
  • Releases: 4
Topics
batch cloud-computing covalent microsoft-azure python python3 quantum-computing
Created over 3 years ago · Last pushed 6 months ago
Metadata Files
Readme Changelog Contributing License Code of conduct

README.md

 

Covalent Azure Batch Plugin

Covalent is a Pythonic workflow tool used to execute tasks on advanced computing hardware. This executor plugin interfaces Covalent with Microsoft Azure Batch.

1. Installation

To use this plugin with Covalent, install it using pip:

sh pip install covalent-azurebatch-plugin

2. Usage Example

This is an example of how a workflow can be constructed to use the Azure 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

from covalent.executor import AzureBatchExecutor

deps_pip = ct.DepsPip( packages=["numpy==1.22.4", "scikit-learn==1.1.2"] )

executor = AzureBatchExecutor( tenantid="tenant-id", clientid="client-id", clientsecret="client-secret", batchaccounturl="https://covalent.eastus.batch.azure.com", batchaccountdomain="batch.core.windows.net", storageaccountname="covalentbatch", storageaccountdomain="blob.core.windows.net", baseimageuri="covalent.azurecr.io/covalent-executor-base:latest", poolid="covalent-pool", retries=3, timelimit=300, cachedir="/tmp/covalent", poll_freq=10 )

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, 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 Microsoft Azure Batch Resources.

3. Configuration

There are many configuration options that can be passed in to the class ct.executor.AzureBatchExecutor or by modifying the covalent config file under the section [executors.azurebatch].

For more information about all of the possible configuration values visit our read the docs (RTD) guide for this plugin.

4. Required Microsoft Azure Resources

In order to run your workflows with covalent there are a few notable Microsoft Azure resources that need to be provisioned first.

The required Azure resources are:

1. Batch account

2. Storage account

3. Resource group

4. Container registry (custom images only)

5. Pool of compute nodes

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

Developing Software for Advanced Computing

GitHub Events

Total
  • Push event: 3
Last Year
  • Push event: 3

Committers

Last synced: 10 months ago

All Time
  • Total Commits: 35
  • Total Committers: 6
  • Avg Commits per committer: 5.833
  • Development Distribution Score (DDS): 0.571
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
CovalentOpsBot c****t 15
Faiyaz Hasan f****1@g****m 13
Will Cunningham w****7 3
mpvgithub 1****b 2
Sankalp Sanand s****p@a****i 1
Alejandro Esquivel ae@a****d 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 5
  • Total pull requests: 36
  • Average time to close issues: 7 days
  • Average time to close pull requests: 16 days
  • Total issue authors: 4
  • Total pull request authors: 9
  • Average comments per issue: 0.6
  • Average comments per pull request: 1.31
  • Merged pull requests: 20
  • Bot issues: 0
  • Bot pull requests: 6
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • araghukas (2)
  • fuyunyun1 (1)
  • kessler-frost (1)
  • AlejandroEsquivel (1)
Pull Request Authors
  • FyzHsn (12)
  • dependabot[bot] (5)
  • araghukas (4)
  • mpvgithub (4)
  • AlejandroEsquivel (3)
  • wjcunningham7 (3)
  • kessler-frost (2)
  • venkatBala (2)
  • pre-commit-ci[bot] (1)
Top Labels
Issue Labels
Pull Request Labels
dependencies (5)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 21 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 4
  • Total maintainers: 2
pypi.org: covalent-azurebatch-plugin

Covalent Azure Batch Plugin

  • Versions: 4
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 21 Last month
Rankings
Dependent packages count: 7.5%
Stargazers count: 28.1%
Forks count: 30.2%
Average: 42.8%
Dependent repos count: 69.6%
Downloads: 78.5%
Last synced: 6 months ago

Dependencies

.github/workflows/changelog.yml actions
  • EndBug/add-and-commit v9 composite
  • actions/checkout v3 composite
.github/workflows/changelog_reminder.yml actions
  • actions/checkout master composite
  • peterjgrainger/action-changelog-reminder v1.3.0 composite
.github/workflows/license.yml actions
  • actions/checkout v3 composite
  • pilosus/action-pip-license-checker main composite
.github/workflows/release.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
  • ncipollo/release-action v1 composite
.github/workflows/tests.yml actions
  • actions-ecosystem/action-get-latest-tag v1 composite
  • actions/checkout v3 composite
  • actions/setup-python v2 composite
  • codecov/codecov-action v3 composite
.github/workflows/version.yml actions
  • AgnostiqHQ/covalent/.github/actions/version develop composite
  • actions/checkout v3 composite
covalent_azurebatch_plugin/assets/infra/Dockerfile docker
  • ${COVALENT_BASE_IMAGE} latest build
pyproject.toml pypi
requirements.txt pypi
  • azure-batch ==13.0.0
  • azure-identity ==1.12.0
  • azure-storage-blob ==12.14.1
  • covalent >=0.202.0,<1
setup.py pypi
tests/functional_tests/requirements.txt pypi
  • numpy ==1.23.2 test
  • python-dotenv ==0.21.0 test
  • scikit-learn ==1.1.2 test
tests/requirements.txt pypi
  • flake8 ==3.9.2 test
  • isort ==5.7.0 test
  • mock ==4.0.3 test
  • pre-commit ==2.13.0 test
  • pytest ==6.2.5 test
  • pytest-asyncio ==0.19.0 test
  • pytest-cov ==2.12.0 test
  • pytest-mock ==3.6.1 test