Giter VIP home page Giter VIP logo

Comments (6)

Ayanaminn avatar Ayanaminn commented on July 17, 2024

我今天也注意到这个问题了,稍后会抽空修复。感谢。

from n46whisper.

Ayanaminn avatar Ayanaminn commented on July 17, 2024

自动断开这个功能我暂时关闭了,因为和google.colab.files.download这个方法有冲突。
files.download会等待当前的cell执行完,这样的话会出现一直计时,然后就先执行断开连接的情况。
目前没想到什么好办法,如果您有什么思路清务必指教。

from n46whisper.

dylanZk1 avatar dylanZk1 commented on July 17, 2024

我看了下files.py的源码,里面是用 js 异步构建了一个download函数(async),里面需要根据Kernel ID返回的数据量判断是否成功,而你在python环境下是直接同步调用sleep函数,让kernel无法返回数据,导致在调用js的download函数时一直在for循环中判断。所以不能直接在代码中调用sleep。我看到里面用 js 创建了一个channel,当下载发起之后,可以通过调用channel的send方法发消息给python程序,然后在python程序中添加接收即可,具体的代码可以参考:https://stackoverflow.com/questions/63263921/is-there-a-way-to-register-a-message-handler-callback-on-a-google-colab-kernel-c
屏幕截图 2023-12-10 200817

from n46whisper.

dylanZk1 avatar dylanZk1 commented on July 17, 2024

https://github.com/googlecolab/colabtools/blob/master/google/colab/files.py

from n46whisper.

dylanZk1 avatar dylanZk1 commented on July 17, 2024

还有一个,就是下载成压缩包的功能,建议可以添加一个选项,让用户选择是否压缩,因为有的用户可能并没有压缩的习惯或打算。当然只是建议

from n46whisper.

Ayanaminn avatar Ayanaminn commented on July 17, 2024

还有一个,就是下载成压缩包的功能,建议可以添加一个选项,让用户选择是否压缩,因为有的用户可能并没有压缩的习惯或打算。当然只是建议

嗯,这个我也觉得,今天改了一下,只有多个文件才以压缩包的形式下载

from n46whisper.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.