Kaggle/docker-python

Interrupt code breaks sometimes

Open

#1.338 aberto em 8 de dez. de 2023

Ver no GitHub
 (1 comment) (0 reactions) (0 assignees)Python (946 forks)batch import
bughelp wanted

Métricas do repositório

Stars
 (2.260 stars)
Métricas de merge de PR
 (Mesclagem média 9h 18m) (3 fundiu PRs em 30d)

Description

🐛 Bug

When running certain code it becomes impossible to interrupt the kernel until that code completes.

To Reproduce

import sklearn
# get large dataset on the order of 1e6 or 1e7
df = ...
sklearn.preprocessing.QuantileTransformer(subsample=1e7, n_quantiles=1e6).fit_transform(df)

Expected behavior

It should interrupt!

Additional context

That's just an example, I've seen it plenty of times over the last few weeks, usually for commands I'd expect to take a while but that I want to stop midway to tweak something. That just seemed like an easy to replicate example. Oddly enough, the QuantileTransformer will interrupt just fine when n_quantiles is an order of magnitude smaller.

Guia do colaborador