首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >tsfresh extract_features运行时错误"freeze_support“

tsfresh extract_features运行时错误"freeze_support“
EN

Stack Overflow用户
提问于 2019-04-09 21:17:47
回答 1查看 398关注 0票数 1

我最近安装了tsfresh包来提取我的时间序列数据的特征。我尝试在documentation中运行该示例,但得到以下错误:

代码语言:javascript
复制
RuntimeError: 
        An attempt has been made to start a new process before the
        current process has finished its bootstrapping phase.

        This probably means that you are not using fork to start your
        child processes and you have forgotten to use the proper idiom
        in the main module:

            if __name__ == '__main__':
                freeze_support()
                ...

        The "freeze_support()" line can be omitted if the program
        is not going to be frozen to produce an executable.

我有点困惑,因为它就是示例代码:

代码语言:javascript
复制
from tsfresh.examples import load_robot_execution_failures
from tsfresh import extract_features

df, _ = load_robot_execution_failures()
X = extract_features(df, column_id='id', column_sort='time')

当我用我自己的数据尝试这个函数时,我得到了同样的错误。我做错了什么?

EN

回答 1

Stack Overflow用户

发布于 2020-08-03 10:38:57

我认为there is可以解决这个问题。您可以尝试将"if __name__ == __main__:"放在函数调用周围。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/55593885

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档