提交新活动

谢谢!您的提交已收到!
哎呀!提交表单时出错了。

提交新闻报道

谢谢!您的提交已收到!
哎呀!提交表单时出错了。

订阅新闻通讯

谢谢!您的提交已收到!
哎呀!提交表单时出错了。
2021年9月15日

2021年Dask用户调查

作者

本文介绍了今年早些时候进行的2021年Dask用户调查结果。感谢所有花时间填写调查问卷的人!这些结果有助于我们更好地了解Dask社区,并将指导未来的开发工作。

原始数据以及分析的初步结果可以在此binder中找到

Binder

如果您在数据中发现了什么,请告诉我们。

目录

重点摘要

我们收到了247份调查回复(与去年略低于240份回复大致相同)。总的来说,回复与往年相似。

我们在调查中提出了43个问题(比前一年增加了18个问题)。我们增加了一系列新问题,涉及人们使用的数据集类型、Dask的稳定性以及人们所在的行业类型。

我们的社区需要

     
  • 更多文档和示例
  •  
  • 更多中级水平文档
  •  
  • 提高Dask的韧性(即计算是否能完成?)

用户也看重这些特性

     
  • 改进的扩展性
  •  
  • 易于部署
  •  
  • 更好的scikit-learn和机器学习支持

典型的Dask用户

调查显示我们的社区具有很强的多样性,使用Dask的方式也不尽相同。尽管如此,我们假设的“典型”Dask用户

     
  • 处理千兆字节大小的数据集
  •  
  • 存储在本地文件系统上
  •  
  • 使用Dask已有1到3年
  •  
  • 偶尔使用Dask,而非每天
  •  
  • 至少部分时间以交互方式使用Dask
  •  
  • 使用计算集群(可能)
  •  
  • 喜欢用网页浏览器查看Dask仪表板
  •  
  • 大多数情况下,Dask对他们来说足够稳定,但提高Dask的韧性会有帮助
  •  
  • 使用Dask dataframe、delayed以及可能的Dask Array API,同时使用numpy/pandas和其他Python库
  •  
  • 对这个人最有帮助的是更多的文档,以及更多在其领域中使用Dask的示例。
  •  
  • 他们可能在科学领域工作(也许是地球科学、生命科学、物理或天文学),或者他们可能在会计、金融、保险或作为技术人员工作。

您可以在这里阅读往年的调查结果:2020年调查结果2019年调查结果

# Let's load in the survey data...
%matplotlib inline

from pprint import pprint
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
import textwrap
import re


df2019 = (
    pd.read_csv("data/2019-user-survey-results.csv.gz", parse_dates=["Timestamp"])
      .replace({"How often do you use Dask?": "I use Dask all the time, even when I sleep"}, "Every day")
)

df2020 = (
    pd.read_csv("data/2020-user-survey-results.csv.gz")
      .assign(Timestamp=lambda df: pd.to_datetime(df['Timestamp'], format="%Y/%m/%d %H:%M:%S %p %Z").astype('datetime64[ns]'))
      .replace({"How often do you use Dask?": "I use Dask all the time, even when I sleep"}, "Every day")
)

df2021 = (
    pd.read_csv("data/2021-user-survey-results.csv.gz")
      .assign(Timestamp=lambda df: pd.to_datetime(df['Timestamp']).astype('datetime64[ns]'))
      .replace({"How often do you use Dask?": "I use Dask all the time, even when I sleep"}, "Every day")
)

common = df2019.columns.intersection(df2020.columns).intersection(df2021.columns)
added = df2021.columns.difference(df2020.columns)
dropped = df2020.columns.difference(df2021.columns)

df = pd.concat([df2019, df2020, df2021])
df['Year'] = df.Timestamp.dt.year
df = df.set_index(['Year', 'Timestamp']).sort_index()

谁是Dask用户?

大多数人表示他们偶尔使用Dask,而一小部分人每天都使用Dask。人们使用Dask的时间长短差异很大,最常见的回复是使用了一到三年。

q = "How often do you use Dask?"
ax = sns.countplot(y=q, data=df2021[q].dropna().str.split(";").explode().to_frame());
ax.set(ylabel="", title=q);
png
q = "How long have you used Dask?"  # New question in 2021
order = ["More than 3 years", "1 - 3 years", "3 months - 1 year", "Less than 3 months", "I've never used Dask"]
ax = sns.countplot(y=q, data=df2021[q].dropna().str.split(";").explode().to_frame(), order=order);
ax.set(ylabel="", title=q);
png

略多于一半的受访者与其他人(他们的团队或组织)一起使用Dask,另一半则独自使用Dask。

q = "Do you use Dask as part of a larger group?"
order = [
    'I use Dask mostly on my own',
    'My team or research group also use Dask',
    'Beyond my group, many people throughout my institution use Dask',
]
ax = sns.countplot(y=q, data=df2021[q].dropna().str.split(";").explode().to_frame(), order=order)
ax.set(ylabel="", title=q);
png

在过去一年中,表示其机构内许多人使用Dask的人数有所增加(2021年有32人这样说,而2020年为19人)。在2019年至2020年期间,表示其直属团队也使用Dask的人数有所下降(2019年有121人这样说,而2020年为94人)。目前尚不清楚我们看到这些变化的原因,因此看看未来几年会发生什么将很有趣。

q = 'Do you use Dask as part of a larger group?'
ax = sns.countplot(y=q, hue="Year", data=df.reset_index());
ax.set(ylabel="", title=q);
png

您在哪一个行业工作?

调查中涉及了广泛的行业。

近一半的回复来自与科学、学术界或政府实验室相关的行业。地球科学的回复最多,而生命科学、物理和天文学也是受欢迎的领域。

大约30%的回复来自商业和科技领域的人员。其中,会计/金融/保险领域的人员与其它技术人员大致平分秋色。

大约10%的回复来自制造业、工程及其他行业(能源、航空航天等)。其余的回复很难归类。

q = "What industry do you work in?"  # New question in 2021
data = df2021[q].dropna().str.split(";").explode().to_frame()
order = data.value_counts()[data.value_counts() > 1].keys().get_level_values(0)
ax = sns.countplot(y=q, data=data, order=order);
ax.set(ylabel="", title=q);
png

您升级到较新版本的Python库有多容易?

大多数用户在需要时可以轻松升级到较新版本的Python库。

q = "How easy is it for you to upgrade to newer versions of Python libraries"
sns.countplot(y=q, data=df2021[q].dropna().explode().to_frame()).set_ylabel('Scale from 1 (Difficult) to 4 (Easy)');
png

人们喜欢如何使用Dask

人们喜欢将Dask与numpy和pandas以及其他一系列Python库一起使用。最受欢迎的Dask API是Dask DataframesDask DelayedDask Arrays

绝大多数人喜欢至少部分时间在Jupyter或IPython中以交互方式使用Dask,并且大多数人使用网页浏览器查看Dask仪表板

您经常与Dask一起使用的其他一些库是什么?

人们与Dask一起使用的十个最常用库是:numpypandasxarrayscikit-learnscipystatsmodelsmatplotlibxgboostnumbajoblib

q = "What are some other libraries that you often use with Dask?"
data = df2021[q].dropna().str.lower().str.split(", ").explode().to_frame()
labels = pd.value_counts(data[q]).iloc[:10].index
sns.countplot(y=q, data=data, order=labels).set_ylabel('');
png

Dask API

人们使用的三个最受欢迎的Dask API是

     
  1. Dask Dataframes
  2.  
  3. Dask Delayed
  4.  
  5. Dask Arrays

与前几年相比,2021年使用dask delayed的人数略有增加。这可能是好事,随着人们在使用Dask方面积累经验和信心,他们更有可能开始使用更高级的功能,例如delayed。除了这一变化外,偏好与往年的结果非常相似。

apis = df2021['Dask APIs'].str.split(", ").explode()
top = apis.value_counts().loc[lambda x: x > 10]
apis = apis[apis.isin(top.index)].reset_index()

sns.countplot(y="Dask APIs", data=apis);
png

交互式还是批处理?

绝大多数人喜欢至少部分时间在Jupyter或IPython中以交互方式使用Dask。不到15%的Dask用户仅在批处理模式下使用Dask(提交将来运行的脚本)。

q = 'Interactive or Batch?'
data = df2021[q].dropna()
data = data.str.replace('Interactive:  I use Dask with Jupyter or IPython when playing with data, Batch: I submit scripts that run in the future', "Interactive and Batch")
data = data.str.replace('Interactive:  I use Dask with Jupyter or IPython when playing with data', "Interactive")
data = data.str.replace('Batch: I submit scripts that run in the future', "Batch")
order = ["Interactive and Batch", "Interactive", "Batch"]
sns.countplot(y=q, data=data.explode().to_frame(), order=order).set_ylabel('');
png

您如何查看Dask的仪表板?

大多数人使用网页浏览器查看Dask仪表板。一小部分人使用dask jupyterlab扩展程序

还有一些人不确定仪表板是什么。如果您也是如此,不妨观看这段20分钟的视频,它解释了仪表板为何如此有用,或在此处查看其余文档这里

q = "How do you view Dask's dashboard?"
ax = sns.countplot(y=q, data=df2021[q].dropna().str.split(", ").explode().to_frame());
ax.set(ylabel="", title=q);
png

本地机器还是集群?

大约三分之二的受访者至少部分时间使用计算集群。

q = 'Local machine or Cluster?'
df[q].dropna().str.contains("Cluster").astype(int).groupby("Year").mean()
Year
2019    0.654902
2020    0.666667
2021    0.630081
Name: Local machine or Cluster?, dtype: float64
q = 'Local machine or Cluster?'
order = [
    'Personal laptop',
    'Large workstation',
    'Cluster of 2-10 machines',
    'Cluster with 10-100 machines',
    'Cluster with 100+ machines'
]
ax = sns.countplot(y=q, data=df2021[q].dropna().str.split(", ").explode().to_frame(), order=order);
ax.set(ylabel="", title=q);
png

如果您使用集群,如何启动Dask?

SSH是在计算集群上启动Dask最常用的方式,其次是HPC资源管理器,然后是Kubernetes。

q = "If you use a cluster, how do you launch Dask? "
data = df2021[q].dropna()
data = data.str.replace("HPC resource manager (SLURM, PBS, SGE, LSF or similar)", "HPC resource manager (SLURM PBS SGE LSF or similar)", regex=False)
data = data.str.replace("I don't know, someone else does this for me", "I don't know someone else does this for me", regex=False)
data = data.str.split(", ").explode().to_frame()
order = data.value_counts()[data.value_counts() > 1].keys().get_level_values(0)
ax = sns.countplot(y=q, data=data, order=order);
ax.set(ylabel="", title=q);
png

如果您使用集群,是否需要在同一个集群中使用多种工作节点类型?

在使用计算集群的人中,略低于一半的人需要在同一个集群中使用多种工作节点类型。例如,这可能包括混合使用带有GPU和不带GPU的工作节点,混合使用分配了低内存或高内存的工作节点等。

q = "If you use a cluster, do you have a need for multiple worker / machine types (e.g. GPU / no GPU, low / high memory) in the same cluster?"  # New question in 2021
ax = sns.countplot(y=q, data=df2021[q].dropna().str.split(";").explode().to_frame());
ax.set(ylabel="", title="Do you need multiple worker/machine types on a cluster?");
png

数据集

您的数据集通常有多大?

Dask用户最常处理千兆字节大小的数据集。很少有用户处理拍字节大小的数据集。

q = "How large are your datasets typically?"  # New question in 2021
ax = sns.countplot(y=q, data=df2021[q].dropna().str.split(", ").explode().to_frame());
ax.set(ylabel="", title=q);
png

您的数据集通常存储在哪里?

大多数人将数据存储在本地文件系统上。

q = "Where are your datasets typically stored?"  # New question in 2021
data = df2021[q].dropna().str.split(", ").explode().to_frame()
order = data.value_counts()[data.value_counts() > 1].keys().get_level_values(0)
ax = sns.countplot(y=q, data=data, order=order);
ax.set(ylabel="", title=q);
png

您通常处理哪些文件格式?

两种最常见的文件格式(csvparquet)在Dask Dataframe用户中很受欢迎。JSON文件格式也经常与Dask一起使用。第四和第五常见的文​​件类型(HDF5zarr)在Dask Array用户中很受欢迎。这与我们了解的Dask Dataframe API最受欢迎,而Dask Arrays紧随其后的情况一致。

q = "What file formats do you typically work with?"  # New question in 2021
data = df2021[q].dropna().str.split(", ").explode().to_frame()
order = data.value_counts()[data.value_counts() > 1].keys().get_level_values(0)
ax = sns.countplot(y=q, data=data, order=order);
ax.set(ylabel="", title=q);
png

这个调查问题的回答分布呈长尾状:报告了各种各样的专用文件格式,其中大多数仅由一两个回复调查的个人使用。

许多这些专用文件格式存储图像数据,这些数据特定于特定领域(天文学、地球科学、显微镜学等)。

list(data.value_counts()[data.value_counts() == 1].keys().get_level_values(0))
['proprietary measurement format',
 'netCDF3',
 'czi',
 'specifically NetCDF4',
 'grib2',
 'in-house npy-like array format',
 'jpeg2000',
 'netCDF4 (based on HDF5)',
 'proprietary microscopy file types. Often I convert to Zarr with a loss of metadata.',
 'sas7bdat',
 'npy',
 'npy and pickle',
 'root with uproot',
 'root',
 'regular GeoTiff',
 '.npy',
 'Text',
 'VCF BAM CRAM',
 'UM',
 'CASA measurement sets',
 'Casa Tables (Radio Astronomy specific)',
 'Custom binary',
 'FITS',
 'FITS (astronomical images)',
 'FITS and a custom semi-relational table specification that I want to kill and replace with something better',
 'Feather (Arrow)',
 'GPKG',
 'GeoTIFF',
 'NetCDF4',
 'Netcdf',
 'Netcdf4',
 'PP',
 'SQL',
 'SQL query to remote DB',
 'SQL to Dataframe',
 'Seismic data (miniSEED)',
 'TFRecords',
 'TIFF',
 'Testing with all file formats. Just want it as a replacement for spark. ',
 '.raw image files',
 'ugh']
XKCD comic 927: Standards

XKCD漫画“标准” https://xkcd.com/927/

首选云平台?

最受欢迎的云解决方案是亚马逊网络服务(AWS),其次是Google云平台(GCP)和微软Azure。

q = "Preferred Cloud?"
order = [
    "Amazon Web Services (AWS)",
    "Google Cloud Platform (GCP)",
    "Microsoft Azure",
    "Digital Ocean",
]
ax = sns.countplot(y=q, data=df2021[q].dropna().str.split(", ").explode().to_frame(), order=order);
ax.set(ylabel="", title=q);
png

您使用Dask项目进行部署吗?

在使用Dask项目进行部署的用户中,dask-jobqueuedask helm chart是两个最受欢迎的选项。人们用于部署的项目种类繁多。

q = "Do you use Dask projects to deploy?"
order = [
    "dask-jobqueue",
    "dask's helm chart",
    "dask-kubernetes",
    "dask's docker image at daskdev/dask",
    "dask-gateway",
    "dask-ssh",
    "dask-cloudprovider",
    "dask-yarn",
    "qhub",
    "dask-mpi",
]
ax = sns.countplot(y=q, data=df2021[q].dropna().str.lower().str.split(", ").explode().to_frame(), order=order);
ax.set(ylabel="", title=q);
png

诊断

我们之前看到,大多数人喜欢使用网页浏览器查看Dask仪表板。

在仪表板中,人们表示最有用的诊断图是

     
  1. 任务流图
  2.  
  3. 进度图,以及
  4.  
  5. 每个工作节点的内存使用图
q = "Which Diagnostic plots are most useful?"  # New question in 2021
ax = sns.countplot(y=q, data=df2021[q].dropna().str.split(', ').explode().to_frame());
ax.set(ylabel="", title=q);
png

我们还在2021年问了一些关于诊断的新问题。

我们发现大多数人(65%)不使用Dask性能报告,这是一种将诊断仪表板保存为静态HTML图以便日后查看的方法。

q = "Do you use Dask's Performance reports?"  # New question in 2021
ax = sns.countplot(y=q, data=df2021[q].explode().to_frame(), order=["Yes", "No"]);
ax.set(ylabel="", title=q);
png

很少有人使用Dask的Prometheus指标。如果您有兴趣了解如何使用此功能,Jacob Tomlinson有一篇关于使用Prometheus + Grafana监控Dask + RAPIDS的优秀文章。

q = "Do you use Dask's Prometheus Metrics?"  # New question in 2021
ax = sns.countplot(y=q, data=df2021[q].explode().to_frame(), order=["Yes", "No"]);
ax.set(ylabel="", title=q);
png

稳定性

我们问了一些关于Dask稳定性的问题,其中许多是2021年的新问题。

大多数人认为Dask对他们来说已经足够有韧性(例如:计算能够完成)。然而,这是我们可以改进的一个领域,因为有36%的人不满意。这是2021年的一个新问题,所以我们无法得知人们对Dask韧性的看法随时间推移发生了怎样的变化。

q = "Is Dask resilient enough for you? (e.g. computations complete)."  # new question in 2021
ax = sns.countplot(y=q, data=df2021[q].dropna().explode().to_frame(), order=["Yes", "No"]);
ax.set(ylabel="", title="Is Dask resilient enough for you?");
png

大多数人认为Dask总体来说对他们来说足够稳定(例如:在不同版本发布之间)。这与往年的调查结果相似。

q = "Is Dask stable enough for you?"
ax = sns.countplot(y=q, data=df2021[q].dropna().explode().to_frame(), order=["Yes", "No"]);
ax.set(ylabel="", title=q);
png

人们还表示Dask的API对他们来说也足够稳定。

q = "Is Dask's API stable enough for you?"
ax = sns.countplot(y=q, data=df2021[q].dropna().explode().to_frame(), order=["Yes", "No"]);
ax.set(ylabel="", title=q);
png

绝大多数人对当前的发布频率(大约每两周一次)感到满意。

q = "How is Dask's release frequency?"  # New question in 2021
ax = sns.countplot(y=q, data=df2021[q].dropna().explode().to_frame());
ax.set(ylabel="", title=q);
png

大多数人表示,如果Dask有长期支持版本,他们会将其代码固定在该版本上。

q = "If Dask had Long-term support (LTS) releases, would you pin your code to use them?"  # New question in 2021
ax = sns.countplot(y=q, data=df2021[q].dropna().explode().to_frame(), order=["Yes", "No"]);
ax.set(ylabel="", title="Would you pin to a long term support release?");
png

用户满意度、支持和文档

我们在2021年的调查中问了一系列关于用户满意度的新问题。

Dask有多容易使用?

大多数人认为Dask中等容易使用,与往年调查结果相同。

q = "On a scale of 1 - 5 (1 being hardest, 5 being easiest) how easy is Dask to use?"
ax = sns.countplot(y=q, data=df2021[q].dropna().explode().to_frame());
ax.set(ylabel="1 = Difficult, 5 = Easy", title="How easy is Dask to use?");
png

Dask的文档如何?

大多数人认为Dask的文档相当不错。

q = "How is Dask's documentation?"  # New question in 2021
ax = sns.countplot(y=q, data=df2021[q].dropna().explode().to_frame());
ax.set(ylabel="1 = Not good, 5 = Great", title=q);
png

您对GitHub上维护者的响应速度有多满意?

几乎所有回复者都对Dask维护者在GitHub上的响应速度持积极态度。

q = "How satisfied are you with maintainer responsiveness on GitHub?"  # New question in 2021
ax = sns.countplot(y=q, data=df2021[q].dropna().explode().to_frame());
ax.set(ylabel="1 = Not satisfied, 5 = Thrilled", title=q);
png

在过去六个月中,您使用了哪些Dask资源来获取支持?

大多数用户首先在dask.org上的文档中寻找帮助。

2021年这个问题回复的分布与往年非常相似,唯一的例外是似乎没有人知道Dask YouTube频道或Gitter聊天在2019年已经存在。

q = 'What Dask resources have you used for support in the last six months?'

resource_map = {
    "Tutorial": "Tutorial at tutorial.dask.org",
    "YouTube": "YouTube channel",
    "gitter": "Gitter chat"
}

df[q] = df[q].str.replace(';',', ')  # Make separator values consistent
d = df[q].str.split(', ').explode().replace(resource_map)
top = d.value_counts()[:8].index
d = d[d.isin(top)]

fig, ax = plt.subplots(figsize=(8, 8))
ax = sns.countplot(y=q, hue="Year", data=d.reset_index(), ax=ax);
ax.set(ylabel="", title=q);
png

改进建议

目前对您最有帮助的是什么?

人们表示目前最有帮助的两大优先事项都与文档有关。人们希望有更多文档,以及更多在其领域的示例。性能改进也被普遍提及为目前最有帮助的事情。

q = "Which would help you most right now?"
order = [
    "More documentation",
    "More examples in my field",
    "Performance improvements",
    "New features",
    "Bug fixes",
]
ax = sns.countplot(y=q, data=df2021[q].explode().to_frame(), order=order)
ax.set(ylabel="", title=q);
png

Dask如何改进?

我们还提供了自由文本回复的机会,回答“Dask如何改进?”这个问题。

Matt之前写过一篇早期趣闻博文,其中更详细地探讨了对这个问题的回复。

他发现了这些反复出现的主题

     
  • 中级文档
  •  
  • 文档组织
  •  
  • 功能性
  •  
  • 高级优化
  •  
  • 运行时稳定性和高级故障排除

由于更多文档和示例是两个最常被请求的改进,我将在此处总结该领域的一些进展

     
  •    关于更多中级文档,Matt说:    
  •      高级用户在性能和调试方面有很多潜在的好材料,发布这些材料可能会很有趣。    
  •  
  •  
  •    Matt指出Dask拥有优秀的参考文档,但缺乏许多好的叙述性文档。为了解决这个问题,Julia Signell目前正在研究如何改进Dask文档的组织(如果您想关注该讨论,可以订阅此问题线程)。  
  •  
  •    Matt评论说,当存在如此多不同的用户叙述时(即Dask被来自许多不同行业的人使用),很难有好的叙述性文档。今年,我们在调查中增加了一个新问题,询问人们工作的行业。我们增加这个问题是因为在过去三年中,“我的领域有更多示例”一直是前两大请求之一。现在我们可以利用这些信息更好地将叙述性文档定向到最需要它的领域(地球科学、生命科学和金融)。  
q = 'What industry do you work in?'
data = df2021[df2021["Which would help you most right now?"] == "More examples in my field"]
order = data[q].value_counts()[data[q].value_counts() > 1].keys()
ax = sns.countplot(y=q, data=data[q].dropna().str.split(', ').explode().to_frame(), order=order);
ax.set(ylabel="", title="What field do you want more documentation examples for?");
png

您最关心哪些常见功能请求?

对numpy和pandas的良好支持对大多数用户至关重要。用户还看重

     
  • 改进的扩展性
  •  
  • 易于部署
  •  
  • Dask的韧性
  •  
  • 更好的scikit-learn和机器学习支持

大多数功能请求与往年的调查结果相似,尽管表示更好的scikit-learn/ML支持对其至关重要的人数有所增加。我们还在2021年增加了一个关于Dask韧性的新问题。

在下图中,您可以看到人们对我们进行此调查的三年中,每个功能请求重要性的评分。

common = (df[df.columns[df.columns.str.startswith("What common feature")]]
          .rename(columns=lambda x: x.lstrip("What common feature requests do you care about most?[").rstrip(r"]")))
a = common.loc[2019].apply(pd.value_counts).T.stack().reset_index().rename(columns={'level_0': 'Question', 'level_1': "Importance", 0: "count"}).assign(Year=2019)
b = common.loc[2020].apply(pd.value_counts).T.stack().reset_index().rename(columns={'level_0': 'Question', 'level_1': "Importance", 0: "count"}).assign(Year=2020)
c = common.loc[2021].apply(pd.value_counts).T.stack().reset_index().rename(columns={'level_0': 'Question', 'level_1': "Importance", 0: "count"}).assign(Year=2021)

counts = pd.concat([a, b, c], ignore_index=True)

d = common.stack().reset_index().rename(columns={"level_2": "Feature", 0: "Importance"})
order = ["Not relevant for me", "Somewhat useful", 'Critical to me']
sns.catplot(x='Importance', row="Feature", kind="count", col="Year", data=d, sharex=False, order=order);
png

往年调查结果

感谢所有参与调查的人!

如果您想阅读更多关于2021年Dask调查的信息,可以查看Dask 2021年早期趣闻的博文这里

您可以在此处阅读往年的调查结果