baal-org / baal

Bayesian active learning library for research and industrial usecases.
https://baal.readthedocs.io
Apache License 2.0
862 stars 86 forks source link

Active Learning with NLP | Documentation #238

Closed nitish1295 closed 1 year ago

nitish1295 commented 1 year ago

Describe the bug Unable to import active_huggingface_dataset from baal.active

---------------------------------------------------------------------------

ImportError                               Traceback (most recent call last)

[<ipython-input-4-281f6293f8fe>](https://localhost:8080/#) in <module>
----> 1 from baal.active import active_huggingface_dataset
      2 from transformers import BertTokenizer
      3 pretrained_weights = 'bert-base-uncased'
      4 
      5 tokenizer = BertTokenizer.from_pretrained(pretrained_model_name_or_path=pretrained_weights)

ImportError: cannot import name 'active_huggingface_dataset' from 'baal.active' (/usr/local/lib/python3.7/dist-packages/baal/active/__init__.py)

---------------------------------------------------------------------------
NOTE: If your import is failing due to a missing package, you can
manually install dependencies using either !pip or !apt.

To view examples of installing some common dependencies, click the
"Open Examples" button below.
---------------------------------------------------------------------------

To Reproduce

Expected behavior Based on the docs this should have worked.

The following works

from baal.active.dataset.nlp_datasets import active_huggingface_dataset

Version (please complete the following information):

Additional context Essentially not a bug, but seems like a problem with documentation. I am currently working on few active learning problems and am planning to use baal for some of them. Maybe I can contribute some minor corrections to the docs as I read them and learn more about baal :)

Dref360 commented 1 year ago

Good catch!

I just opened a PR to fix this issue thank you!

And yes we would absolutely love to review your PRs :) Any help is appreciated!