Following the previous article written about solving Python dependencies, we will take a look at the quality of software. This article will cover “inspections” of software stacks and will link a free dataset available on Kaggle. Even though the title says the quality of “machine learning software”, principles and ideas can be reused for inspecting any software quality.

在上一篇有关解决Python依赖关系的文章之后,我们将介绍软件的质量。 本文将介绍软件堆栈的“检查”,并将链接Kaggle上可用的免费数据集。 即使标题说明了“机器学习软件”的质量,也可以重用原理和思想来检查任何软件质量。

应用程序(软件和硬件)堆栈 (Application (Software & Hardware) Stack)

Let’s consider a Python machine learning application. This application can use a machine learning library, such as TensorFlow. TensorFlow is in that case a direct dependency of the application and by installing it, the machine learning application is using directly TensorFlow and indirectly dependencies of TensorFlow. Examples of such indirect dependencies of our application can be NumPy or absl-py that are used by TensorFlow.

让我们考虑一个Python机器学习应用程序。 该应用程序可以使用机器学习库,例如TensorFlow 。 在这种情况下,TensorFlow是应用程序的直接依赖项,通过安装它,机器学习应用程序将直接使用TensorFlow并间接使用TensorFlow依赖项。 我们应用程序的这种间接依赖关系的示例可以是TensorFlow使用的NumPy或absl-py 。

Our machine learning Python application and all the Python libraries run on top of a Python interpreter in some specific version. Moreover, they can use other additional native dependencies (provided by the operating system) such as glibc or CUDA (if running computations on GPU). To visualize this fact, let’s create a stack with all the items creating the application stack running on top of some hardware.

我们的机器学习Python应用程序和所有Python库在某些特定版本的Python解释器上运行。 此外,他们可以使用其他附加的本机依赖项(由操作系统提供),例如glibc或CUDA (如果在GPU上运行计算)。 为了形象化这一事实,让我们创建一个堆栈,其中所有项都创建在某些硬件之上运行的应用程序堆栈。

Abstract layers of an application stack.
应用程序堆栈的抽象层。

Note that an issue in any of the described layers causes that our Python application misbehaves, produces wrong output, produces runtime errors, or simply does not start at all.

请注意,任何描述的层中的问题都会导致我们的Python应用程序行为异常,产生错误的输出,产生运行时错误,或者根本无法启动。

Let’s try to identify any possible issues in the described stack by building the software and let’s have it running on our hardware. By doing so we can spot possible issues before pushing our application to a production environment or fine-tune the software so that we get the best possible out of our application on the hardware available.

让我们尝试通过构建软件来确定所描述堆栈中的任何可能问题,并使其在我们的硬件上运行。 这样,我们可以在将应用程序推送到生产环境之前发现可能的问题,或者对软件进行微调,以便在可用硬件上充分利用应用程序。

按需软件堆栈创建 (On-demand software stack creation)

If our application depends on a TensorFlow release starting version 2.0.0 (e.g. requirements on API offered by tensorflow>=2.0.0), we can test our application with different versions of TensorFlow up to the current 2.3.0 release available on PyPI to this date. The same can be applied to transitive dependencies of TensorFlow, e.g. absl-py, NumPy, or any other. A version change of any transitive dependency can be performed analogically to any other dependency in our software stack.

如果我们的应用程序依赖于2.0.0版本开始的TensorFlow版本(例如tensorflow>=2.0.0提供的API要求),我们可以使用不同版本的TensorFlow来测试我们的应用程序,直到PyPI上可用的当前2.3.0版本为止。 这个日期 。 这可以应用于TensorFlow的传递依赖项,例如absl-py , NumPy或任何其他。 任何传递依赖的版本更改都可以类似于我们软件堆栈中的任何其他依赖进行。

依赖猴子 (Dependency Monkey)

Note one version change can completely change (or even invalidate) what dependencies in what versions will be present in the application stack considering the dependency graph and version range specifications of libraries present in the software stack. To create a pinned down list of packages in specific versions to be installed a resolver needs to be run in order to resolve packages and their version range requirements.

请注意,考虑到软件堆栈中存在的库的依赖关系图和版本范围规范,一个版本更改可以完全更改(甚至无效)应用程序堆栈中将存在哪些版本的依赖关系。 要创建要安装的特定版本的软件包的固定列表,需要运行解析器以解析软件包及其版本范围要求。

Do you remember the state space described in the first article of “How to beat Python’s pip” series? Dependency Monkey can in fact create the state space of all the possible software stacks that can be resolved respecting version range specifications. If the state space is too large to resovle in a reasonable time, it can be sampled.

您还记得“如何击败Python的点子”系列的第一篇文章中描述的状态空间吗? Dependency Monkey实际上可以创建所有可能的软件堆栈的状态空间,这些版本可以根据版本范围规范进行解析。 如果状态空间太大而无法在合理的时间内恢复状态,则可以对其进行采样。

An interpolated score function for a state-space made when installing two dependencies “simplelib” and “anotherlib” in different versions (valid combinations of different versions installed together).
当在不同版本中安装两个依赖项“ simplelib”和“ anotherlib”(一起安装的不同版本的有效组合)时,为状态空间提供一个插值得分函数。

A component called “Dependency Monkey” is capable of creating different software stacks considering the dependency graph and version specifications of packages in the dependency graph. This all is done offline based on pre-computed results from Thoth’s solver runs (see the previous article from “How to beat Python’s pip” series). The results of solver runs are synced into Thoth’s database so that they are available in a query-able form. Doing so enables Dependency Monkey to resolve software stacks at a fast pace (see a YouTube video on optimizing Thoth’s resolver). Moreover, the underlying algorithm can consider Python packages published on different Python indices (besides PyPI, it can also use custom TensorFlow builds from an index such as the AICoE one). We will do a more in-depth explanation of Dependency Monkey in one of the upcoming articles. If you are too eager, feel free to browse its online documentation.

考虑到依赖关系图和依赖关系图中软件包的版本规格,称为“依赖关系猴子”的组件能够创建不同的软件堆栈。 所有这些都是根据Thoth的求解器运行的预先计算的结果脱机完成的(请参阅“ How to beat Python's pip”系列的上一篇文章) 。 求解器运行的结果将同步到Thoth的数据库中,以便以可查询的形式提供它们。 这样做使Dependency Monkey能够快速解决软件堆栈的问题 (请参见有关优化Thoth解析器的YouTube视频 )。 此外,底层算法可以考虑发布在不同Python索引上的Python包( 除了PyPI之外 ,它还可以使用来自诸如AICoE的索引的自定义TensorFlow构建 )。 我们将在后续文章之一中对Dependency Monkey做更深入的解释。 如果您太渴望了,请随时浏览其在线文档 。

Amun API (Amun API)

Now, let’s utilize a service called “Amun”. This service was designed to accept a specification of the software stack and hardware and execute an application given the specification.

现在,让我们利用一项名为“ Amun ”的服务。 该服务旨在接受软件堆栈和硬件的规范,并根据给定的规范执行应用程序。

Amun is an OpenShift cluster native application, that utilizes OpenShift features (such as builds, container image registry, …) and Argo Workflows to run desired software on specific hardware using a specific software environment. The specification is accepted in a JSON format that is subsequently translated into respective steps that need to be done in order to test the given stack build and run.

Amun是一个OpenShift群集本机应用程序,它利用OpenShift功能(例如构建,容器映像注册表等)和Argo Workflow在使用特定软件环境的特定硬件上运行所需的软件。 该规范以JSON格式接受,随后将其转换为需要执行的各个步骤,以测试给定的堆栈构建和运行。

A walkthrough on running Amun inspections to check the quality of software.
有关运行Amun检查以检查软件质量的演练。

The video linked above shows how Amun inspections are run and how the knowledge created is aggregated using OpenShift, Argo workflows, and Ceph. You can see inspected different TensorFlow builds tensorflow , tensorflow-cpu , intel-tensorflow and a community builds of TensorFlow for AVX2 instruction set support available on the AICoE index.

上面链接的视频显示了如何运行Amun检查以及如何使用OpenShift,Argo工作流程和Ceph汇总所创建的知识。 您可以在AICoE索引上看到经过检查的不同TensorFlow构建tensorflowtensorflow-cpuintel-tensorflow和TensorFlow for AVX2指令集支持的社区构建 。

在Kaggle上的Thoth检查数据集 (Thoth’s inspection dataset on Kaggle)

We (Red Hat) have produced multiple inspections as part of the project Thoth where we tested different TensorFlow releases and different TensorFlow builds.

我们(Red Hat)作为Thoth项目的一部分进行了多次检查,在其中我们测试了不同的TensorFlow版本和不同的TensorFlow版本。

One such dataset is Thoth’s performance data set in version 1 on Kaggle. It’s consisting out of nearly 4000 files capturing information about inspection runs of TensorFlow stacks. A notebook published together with the dataset can help one exploring the dataset.

这样的数据集就是在Kaggle的版本1中的Thoth的性能数据 。 它由近4000个文件组成,这些文件捕获有关TensorFlow堆栈检查运行的信息。 与数据集一起发布的笔记本可以帮助人们探索数据集。

An introduction to Thoth’s datasets available on Kaggle.
在Kaggle上可获得Thoth数据集的简介。

托特计划 (Project Thoth)

Project Thoth is an application that aims to help Python developers. If you wish to be updated on any improvements and any progress we make in project Thoth, feel free to subscribe to our YouTube channel where we post updates as well as recordings from scrum demos.

Project Thoth是旨在帮助Python开发人员的应用程序。 如果您希望了解我们在Thoth项目中所做的任何改进和进展的最新信息,请随时订阅我们的YouTube频道 ,我们在其中发布更新以及Scrum演示的录音。

Stay tuned for any updates!

请随时关注任何更新!

翻译自: https://towardsdatascience.com/how-to-beat-pythons-pip-inspecting-the-quality-of-machine-learning-software-f1a028f0c42a


http://www.taodudu.cc/news/show-994908.html

相关文章:

  • 数据冒险控制冒险_劳动生产率和其他冒险
  • knn 邻居数量k的选取_选择K个最近的邻居
  • 什么样的代码是好代码_什么是好代码?
  • 在Python中使用Twitter Rest API批量搜索和下载推文
  • 大数据 vr csdn_VR中的数据可视化如何革命化科学
  • 导入数据库怎么导入_导入必要的库
  • 更便捷的画决策分支图的工具_做出更好决策的3个要素
  • 矩阵线性相关则矩阵行列式_搜索线性时间中的排序矩阵
  • bigquery数据类型_将BigQuery与TB数据一起使用后的成本和性能课程
  • 脚本 api_从脚本到预测API
  • binary masks_Python中的Masks概念
  • python 仪表盘_如何使用Python刮除仪表板
  • aws emr 大数据分析_DataOps —使用AWS Lambda和Amazon EMR的全自动,低成本数据管道
  • 先进的NumPy数据科学
  • 统计和冰淇淋
  • 对数据仓库进行数据建模_确定是否可以对您的数据进行建模
  • python内置函数多少个_每个数据科学家都应该知道的10个Python内置函数
  • 针对数据科学家和数据工程师的4条SQL技巧
  • 芒果云接吗_芒果糯米饭是生产力的关键吗?
  • 公司生日会生日礼物_你的生日有多受欢迎?
  • 旧金山字体_旧金山建筑业的兴衰。 施工趋势与历史
  • lambda函数,函数符_为什么您永远不应该在Lambda函数中使用print()
  • ai 中 统计_AI统计(第2部分)
  • twitter数据分析_Twitter上最受欢迎的数据科学文章主题
  • 是什么使波西米亚狂想曲成为杰作-数据科学视角
  • 流行编程语言_编程语言的流行度排名
  • corba的兴衰_数据科学薪酬的兴衰
  • 通才与专家_那么您准备聘请数据科学家了吗? 通才还是专家?
  • 数据科学家 数据工程师_数据科学家实际上赚了多少钱?
  • spotify歌曲下载_使用Spotify数据预测哪些“ Novidades da semana”歌曲会成为热门歌曲

如何击败Python的问题相关推荐

  1. 王者归来!C语言击败Python勇夺“2019年度编程语言”冠军

    点击我爱计算机视觉标星,更快获取CVML新技术 本文转载自新智元.   新智元报道   来源:tiobe 编辑:张佳.艳芹 [新智元导读]2019年哪个编程语言最火?大多数人都以为稳坐年度编程语言冠军 ...

  2. python中api_通过Python中的API查找相关的工作技能

    python中api 工作技能世界 (The World of Job Skills) So you want to figure out where your skills fit into tod ...

  3. python bokeh_提升视觉效果:使用Python和Bokeh制作交互式地图

    python bokeh Let's face it, fellow data scientists: our clients LOVE dashboards. Why wouldn't they? ...

  4. Python v / s PHP:2019年选择哪种编程语言?

    在当今颠覆性的技术世界中,Python和PHP是正在使用的两种最受欢迎​​的服务器端语言. 在许多方面,Python和PHP由于几乎相同的功能而相互竞争. 它们的开源优势和生产功能吸引了大多数企业和开 ...

  5. sql横着连接起来sql_SQL联接的简要介绍(到目前为止)

    sql横着连接起来sql SQL Join是什么意思? (What does a SQL Join mean?) A SQL join describes the process of merging ...

  6. 用户体验可视化指南pdf_R中增强可视化的初学者指南

    用户体验可视化指南pdf Learning to build complete visualizations in R is like any other data science skill, it ...

  7. 管道过滤模式 大数据_大数据管道配方

    管道过滤模式 大数据 介绍 (Introduction) If you are starting with Big Data it is common to feel overwhelmed by t ...

  8. 工作10年厌倦写代码_厌倦了数据质量讨论?

    工作10年厌倦写代码 I have been in tons of meetings where data and results of any sort of analysis have been ...

  9. r a/b 测试_R中的A / B测试

    r a/b 测试 什么是A / B测试? (What is A/B Testing?) A/B testing is a method used to test whether the respons ...

最新文章

  1. java接口是类型吗_JAVA中,接口到底是不是类
  2. 废弃电器电子产品回收:需要的不仅是补贴 !
  3. 统计单一进程IOPS
  4. 安徽省2019年普通高校招生文史、理工类最低控制分数线一览表
  5. 使用POI导入和导出 Excel文件
  6. 无法访问netflix服务_Choerodon 的微服务之路(三):服务注册与发现
  7. android 面试总结,后续注意学习
  8. Python浅谈gevent实现协程
  9. checkbox 多选 mysql 搜索_mySQL技术的方方面面,不管是应用还是面试,看这一文就够了...
  10. MySQL 添加字段报错1005 Can‘t create table ‘#sql-12d23_4bd‘ (errno: 28)
  11. require smarty.class.php 报错,Smarty SSTI
  12. IoT Analytics:物联网2020年回顾,十大重要进展
  13. P1425 小鱼的游泳时间 题解
  14. 如何将xlsx表格文件转换成txt文件?
  15. 使用花生壳,idea外网访问oracle数据库
  16. c语言编程电机星三角启动,三相异步电动机星三角减压启动控制plc编程实例
  17. VS2019MFC实现汉诺塔游戏(鼠标拖动盘子无轨迹、连续演示、单步演示)
  18. 家庭理财期末考试试卷计算机,计算机科学与技术 家庭理财管理信息系统本科学位论文.doc...
  19. 无线互动会议室方案-圆桌会议
  20. 计算机毕设(附源码)JAVA-SSM教务排课管理系统

热门文章

  1. mysql gtid基础_MySQL 基础知识梳理学习(四)----GTID
  2. 二分(三分)+快速幂
  3. c语言经典算法——查找一个整数数组中第二大数
  4. c++类对象的创建方式
  5. shell将命令执行的结果赋值给 变量
  6. ubuntu下无法在根目录创建文件夹;permission denied 权限不足问题解决方法
  7. 【数字逻辑入门】计算机如何存储1位二进制数
  8. java过滤器如何操作数据库_jsp – 使用Java中的过滤器验证用户名,密码(与数据库联系)...
  9. [LeetCode] Two Sum
  10. JQuery发起ajax请求,并在页面动态的添加元素