MarcelRobeer / explabox

Explore/examine/explain/expose your model with the explabox!
https://explabox.readthedocs.io
GNU Lesser General Public License v3.0
14 stars 0 forks source link

Drugsreview notebook prints lots of linebreaks at section 5.1 #7

Closed riwish closed 1 year ago

riwish commented 1 year ago

Summary of bug

The explabox drugsreview notebook prints lots of linebreaks </> at section 5.1

Environment information

Reproducing the bug

Steps to reproduce the behavior:

Run the explabox review notebook until section 5.1

...
box.expose.input_space('all', min_length=0, max_length=6000)

Solutions Attempted

I didn't try to fix the problem as I haven't found the issue problematic. The desired output was being shown, however I was confused by the many linebreaks (>10) and wanted to report this unexpected behaviour.

Expected behavior

A digestable type of output but without preceding linebreaks

MarcelRobeer commented 1 year ago

Have discussed this with @mpbron. We require a patch in dependency instancelib-onnx to fix this behavior. Once the feature has been added to disable tqdm output in instancelib-onnx we will fix in in the explabox.

MarcelRobeer commented 1 year ago

I have implemented and alternate fix, where tqdm is silenced in general in an imported package. This behavior is fixed by silencing tqdm in instancelib.machinelearning, through adding the

import instancelib.machinelearning
from genbase import silence_tqdm

with silence_tqdm(instancelib.machinelearning):
    for i in instances:
        ...

statement in text_sensitivity.input_space_robustness(). This requires genbase==0.2.14 and text-sensitivity==0.3.3. The outer for-loop does contain tqdm to show a progress bar.