phurwicz / hover

:speedboat: Label data at scale. Fun and precision included.
https://phurwicz.github.io/hover
MIT License
321 stars 19 forks source link

Getting GCC compile error for installation on MacOS #22

Closed MohitMayankOP closed 2 years ago

MohitMayankOP commented 2 years ago

I am trying to install hover on my MacOS Monterey which has the miniforge python installation (python 3.8). I get following error message -- distutils.errors.CompileError: command 'gcc' failed with exit status 1

Maybe a conda package will help with this?

phurwicz commented 2 years ago

Track PR to conda-forge: https://github.com/conda-forge/staged-recipes/pull/17926

In the meantime, feel free to share more traceback.

phurwicz commented 2 years ago

Update: this conda-forge PR for 0.5.0 is unlikely to pass due to failed builds. Here's what we have to do:

Because 1 alters the source code, it makes more sense to start conda support at the upcoming 0.6.0 release.

@MohitMayankOP could you try a pip installation for 0.5.0 instead? Or conda install -c phurwicz hover.

MohitMayankOP commented 2 years ago

Hey @phurwicz, able to install using conda install -c phurwicz hover. For future reference, can we add it to readme? Thnx for the help!

phurwicz commented 2 years ago

Let me know if the conda installation above worked for you during runtime. I'm a bit concerned because the dependency specification for 0.5.0 on conda is flawed. Specifically, snorkel on some version may conflict with pytorch, scikit-learn, and even numpy versions that people commonly use.

I would delay adding conda installation to README till 0.6.0 makes it to conda-forge. (This should happen within a few weeks)

MohitMayankOP commented 2 years ago

I tried it out and it didn't. First I had to reinstall certain packages due to version conflicts, which is okay. But even after that when I try to run hover using following code, I cannot see the visualization. Code I used,

from hover.recipes import simple_annotator
from hover.recipes.stable import _simple_annotator
from bokeh.io import show, output_notebook

output_notebook()

interactive_plot = simple_annotator(dataset)
show(interactive_plot, notebook_url='https://localhost:8888')

Console output I get,

🔵 SupervisableTextDataset: Initializing...
🔵 SupervisableTextDataset: Deduplicating...
🔵 SupervisableTextDataset: --subset raw rows: 19544 -> 19544.
🔵 SupervisableTextDataset: --subset train rows: 0 -> 0.
🔵 SupervisableTextDataset: --subset dev rows: 0 -> 0.
🔵 SupervisableTextDataset: --subset test rows: 0 -> 0.
🟢 SupervisableTextDataset: Set up label encoder/decoder with 0 classes.
🟢 SupervisableTextDataset: Population updater: latest population with 0 classes.
🟢 SupervisableTextDataset: SupervisableTextDataset: finished initialization.
100%|█████████████████████████████████████████████████████████| 19544/19544 [00:00<00:00, 568139.76it/s]
🔵 SupervisableTextDataset: Fit-transforming UMAP on 19544 samples...
OMP: Info #271: omp_set_nested routine deprecated, please use omp_set_max_active_levels instead.
🔵 SupervisableTextDataset: Transforming UMAP on 0 samples...

Not sure if this is bcoz of my dataset or something else. But yeah the dependency spec is kinda flawed and requires manual effort.

phurwicz commented 2 years ago

Console Output

The console output seems ok. There is a numba warning, but everything else is expected.

However, this output cannot be from the code block you posted. It should be from something like

dataset = SupervisableTextDataset.from_pandas(<your_dataframe>)
dataset.compute_2d_embedding(*args)

Posted Code Block

If you see neither an exception or the visualization, then this particular problem is not with installation or dependencies, but usage. What about removing notebook_url='https://localhost:8888'?

Also _simple_annotator is different from simple_annotator. The web tutorial had to use _simple_annotator, but it explained that in real usage one should choose simple_annotator (without the underscore prefix).

phurwicz commented 2 years ago

Tracking 0.6.0 release on conda-forge: https://github.com/conda-forge/staged-recipes/pull/18038

phurwicz commented 2 years ago

Hi @MohitMayankOP, the package is now available: https://github.com/conda-forge/hover-feedstock

conda install -c conda-forge hover should do it :)

Please let me know if it runs ok (it should now).

github-actions[bot] commented 2 years ago

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] commented 2 years ago

This issue was closed because it has been inactive for 14 days since being marked as stale.