<div align="center">
![covalent logo](https://github.com/AgnostiqHQ/covalent/blob/master/doc/source/_static/dark.png#gh-dark-mode-only)
![covalent logo](https://github.com/AgnostiqHQ/covalent/blob/master/doc/source/_static/light.png#gh-light-mode-only)
[![version](https://github-covalent-badges.s3.amazonaws.com/badges/version.svg?maxAge=3600)](https://github.com/AgnostiqHQ/covalent)
[![python](https://img.shields.io/badge/python-3.8-blue.svg)](https://www.python.org/downloads/release/python-380)
[![tests](https://github.com/AgnostiqHQ/covalent/actions/workflows/tests.yml/badge.svg)](https://github.com/AgnostiqHQ/covalent/actions/workflows/tests.yml)
[![publish](https://github.com/AgnostiqHQ/covalent/actions/workflows/publish_master.yml/badge.svg)](https://github.com/AgnostiqHQ/covalent/actions/workflows/publish_master.yml)
[![docs](https://readthedocs.org/projects/covalent/badge/?version=latest)](https://covalent.readthedocs.io/en/latest/?badge=latest)
[![codecov](https://codecov.io/gh/AgnostiqHQ/covalent/branch/master/graph/badge.svg?token=YGHCB3DE4P)](https://codecov.io/gh/AgnostiqHQ/covalent)
[![agpl](https://img.shields.io/badge/License-AGPL_v3-blue.svg)](https://www.gnu.org/licenses/agpl-3.0.en.html)
</div>
## ð¤ What is Covalent?
Covalent is a Pythonic workflow tool used to execute tasks on advanced computing hardware. Users can decorate their existing Python functions as electrons (tasks) or lattices (workflows) and then run these functions locally or dispatch them to various classical and quantum backends according to the hardware requirements. After submitting workflows, users can use the browser-based Covalent viewer to visualize dependencies and the workflow execution progress. User can view a variety of information about the workflow such as the status, errors, the workflow's dependency graph, and metadata, among other things. Covalent is designed to make it easy for users to keep track of their computationally heavy experiments by providing a simple and intuitive framework to store, modify, and re-analyze computational experiments. Covalent is rapidly expanding to include support for a variety of cloud interfaces, including HPC infrastructure tools developed by major cloud providers and emerging quantum APIs. It has never been easier to deploy your code on the world's most advanced computing hardware with Covalent. Read more in the official [documentation](https://covalent.readthedocs.io/en/latest/).
## ⨠Features
<div align="center">
![covalent ui banner](https://github.com/AgnostiqHQ/covalent/blob/master/doc/source/_static/uibanner.png?raw=true)
<em>With Covalent's UI, bring your workflows to life! </em>
</div>
- **Purely Pythonic** : No need to learn any new syntax or mess around with YAML. Construct your complex workflow programmatically with native python functions. By just adding decorators to your functions, you can supercharge your experiments.
- **Native parallelization** : Covalent natively parallelizes parts of your workflow that are independent of each other.
- **Monitor with UI** : Covalent provides an intuitive and aesthetically beautiful browser-based user interface to monitor and manage your workflows.
- **Abstracted dataflow** : No need to worry about the details of the underlying data structures. Covalent automatically takes care of data dependencies in the background while you concentrate on understanding the big picture.
- **Result management** : Covalent automatically manages the results of your workflows. Whenever you need to modify parts of your workflow, from inputs to components, Covalent natively stores and saves the run of every experiment in a reproducible format.
- **Little-to-no overhead** : Covalent is designed to be as lightweight as possible and is optimized for the most common use cases. Covalent's overhead is less than 0.1% of the total runtime for typical high compute applications and often has a constant overhead of ~ 10-100μs -- and this is constantly being optimized.
- **Interactive** : Unlike other workflow tools, Covalent is interactive. You can view, modify, and re-submit workflows directly within a Jupyter notebook.
For a more in-depth description of Covalent's features and how they work, refer to the [Concepts](https://covalent.readthedocs.io/en/latest/concepts/concepts.html) page.
## ð¦ Installation
Covalent is developed using Python version 3.8 on Linux and macOS. The easiest way to install Covalent is using the PyPI package manager:
```console
pip install cova
```
Refer to the [Getting Started](https://covalent.readthedocs.io/en/latest/getting_started/index.html) guide for more details on setting up.
## ð Example
Begin by starting the Covalent servers:
```console
covalent start
```
Navigate to the user interface at `http://localhost:47007` to monitor workflow execution progress.
In your Python code, it's as simple as adding a few decorators! Consider the following example which uses a support vector machine (SVM) to classify types of iris flowers.
<table style='margin-left: auto; margin-right: auto; word-wrap: break-word;'>
<tr>
<th style='text-align:center;'>Without Covalent</th>
<th style='text-align:center;'>With Covalent</th>
</tr>
<tr>
<td valign="top">
``` python
from numpy.random import permutation
from sklearn import svm, datasets
def load_data():
iris = datasets.load_iris()
perm = permutation(iris.target.size)
iris.data = iris.data[perm]
iris.target = iris.target[perm]
return iris.data, iris.target
def train_svm(data, C, gamma):
X, y = data
clf = svm.SVC(C=C, gamma=gamma)
clf.fit(X[90:], y[90:])
return clf
def score_svm(data, clf):
X_test, y_test = data
return clf.score(
X_test[:90],
y_test[:90]
)
def run_experiment(C=1.0, gamma=0.7):
data = load_data()
clf = train_svm(
data=data,
C=C,
gamma=gamma
)
score = score_svm(data=data, clf=clf)
return score
result=run_experiment(C=1.0, gamma=0.7)
```
</td>
<td valign="top">
```python
from numpy.random import permutation
from sklearn import svm, datasets
import covalent as ct
@ct.electron
def load_data():
iris = datasets.load_iris()
perm = permutation(iris.target.size)
iris.data = iris.data[perm]
iris.target = iris.target[perm]
return iris.data, iris.target
@ct.electron
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 score_svm(data, clf):
X_test, y_test = data
return clf.score(
X_test[:90],
y_test[:90]
)
@ct.lattice
def run_experiment(C=1.0, gamma=0.7):
data = load_data()
clf = train_svm(
data=data,
C=C,
gamma=gamma
)
score = score_svm(
data=data,
clf=clf
)
return score
dispatch_id =
run_experiment.dispatch(
C=1.0,
gamma=0.7
)
result = ct.get_result(dispatch_id)
```
</td>
</tr>
<tr>
<td valign="top">
```python
>>> print(result)
0.988888888
```
</td>
<td valign="top">
```python
>>> print(f"""
... status = {result.status}
... input = {result.inputs}
... result = {result.result}
... """)
status = Status(STATUS='COMPLETED')
input = {'C': 1.0, 'gamma': 0.7}
result = 0.9666666666666667
```
</td>
</tr>
</table>
For more examples, please refer to the [Covalent tutorials](https://covalent.readthedocs.io/en/latest/tutorials/tutorials.html).
## ð Documentation
The official documentation includes tips on getting started, some high level concepts, a handful of tutorials, and the API documentation. To learn more, please refer to the [Covalent documentation](https://covalent.readthedocs.io/en/latest/).
## âï¸ Contributing
To contribute to Covalent, refer to the [Contribution Guidelines](https://github.com/AgnostiqHQ/covalent/blob/master/CONTRIBUTING.md). We use GitHub's [issue tracking](https://github.com/AgnostiqHQ/covalent/issues) to manage known issues, bugs, and pull requests. Get star
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
共54个文件
py:39个
txt:6个
pkg-info:2个
资源分类:Python库 所属语言:Python 资源全名:cova-0.22.9.tar.gz 资源来源:官方 安装方法:https://lanzao.blog.csdn.net/article/details/101784059
资源推荐
资源详情
资源评论
收起资源包目录
cova-0.22.9.tar.gz (54个子文件)
cova-0.22.9
MANIFEST.in 125B
PKG-INFO 12KB
pyproject.toml 1KB
covalent
executor
executor_plugins
local.py 4KB
__init__.py 8KB
base.py 11KB
_results_manager
utils.py 2KB
result.py 15KB
__init__.py 894B
results_manager.py 6KB
__init__.py 1KB
_workflow
electron.py 17KB
__init__.py 930B
lattice.py 14KB
transport.py 11KB
_shared_files
utils.py 8KB
logger.py 2KB
util_classes.py 2KB
__init__.py 913B
defaults.py 3KB
config.py 6KB
context_managers.py 4KB
tests
covalent_dispatcher_tests
__init__.py 0B
init_test.py 2KB
choose_conda_test.py 2KB
dispatcher_stack_test.py 2KB
data.py 3KB
functional_tests
basic_dispatcher_test.py 3KB
dispatcher_server_test.py 2KB
__init__.py 0B
docs_how_to_test.py 2KB
serialization_test.py 4KB
LICENSE 34KB
setup.cfg 38B
covalent_ui
app.py 4KB
result_webhook.py 2KB
__init__.py 0B
VERSION 7B
covalent_dispatcher
_service
app.py 2KB
_cli
cli.py 2KB
service.py 11KB
__init__.py 0B
__init__.py 3KB
_core
__init__.py 15KB
requirements.txt 246B
setup.py 3KB
cova.egg-info
PKG-INFO 12KB
requires.txt 246B
not-zip-safe 1B
SOURCES.txt 2KB
entry_points.txt 63B
top_level.txt 47B
dependency_links.txt 1B
README.md 9KB
共 54 条
- 1
资源评论
挣扎的蓝藻
- 粉丝: 13w+
- 资源: 15万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- meta-llama-3-8b-instruct 的 model-00004-of-00004.safetensors
- IMG_0006.CR2.cr2
- 幸运红包娱乐微信小程序源码 多玩法安装简单
- packagecom5_QQ浏览器压缩包.zip
- MY3-3WHY-可以刷萤石H6C-V100-2C3WF
- 深度解析木马隐藏技术:核心原理与VMware网络实验指南
- pbootcms百度智能小程序插件
- 指令调度和延迟分支学习资料.rar
- HTML5小游戏【飞得更高跳跃游戏feidegenggao】游戏源码分享下载 - feidegenggao.zip
- 第一讲:单片机STC89C52+RA8889驱动控制彩屏(源码公开)
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功