Code Monkey home page Code Monkey logo

toxic_spans's People

Contributors

ceesroele avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

toxic_spans's Issues

error when running run.py for prediction

Hey,

at the outset: beautiful effort. It really saved me a lot of time from recoding the whole spancat pipeline.

However, i get the following error when running the run all command. Can you tell me what am I missing? am running your code as is, only difference is to save time/get to prediction faster, am running the training only for 2 epochs. Do you think that might be causing this problem?

(toxic) mitch@D21ML-MMITHUN toxic_spans % python run.py "Enter your toxic sentence here, my apologies for the example, you idiot"
Traceback (most recent call last):
  File "/Users/mitch/research/piranha/toxic_spans/run.py", line 58, in <module>
    run(args.input, spans_key=spans_key, model_reference=args.model_reference)
  File "/Users/mitch/research/piranha/toxic_spans/run.py", line 17, in run
    nlp = spacy.load(model_reference)
  File "/Users/mitch/opt/miniconda3/envs/toxic/lib/python3.10/site-packages/spacy/__init__.py", line 54, in load
    return util.load_model(
  File "/Users/mitch/opt/miniconda3/envs/toxic/lib/python3.10/site-packages/spacy/util.py", line 434, in load_model
    return load_model_from_path(Path(name), **kwargs)  # type: ignore[arg-type]
  File "/Users/mitch/opt/miniconda3/envs/toxic/lib/python3.10/site-packages/spacy/util.py", line 506, in load_model_from_path
    nlp = load_model_from_config(
  File "/Users/mitch/opt/miniconda3/envs/toxic/lib/python3.10/site-packages/spacy/util.py", line 554, in load_model_from_config
    nlp = lang_cls.from_config(
  File "/Users/mitch/opt/miniconda3/envs/toxic/lib/python3.10/site-packages/spacy/language.py", line 1818, in from_config
    nlp.add_pipe(
  File "/Users/mitch/opt/miniconda3/envs/toxic/lib/python3.10/site-packages/spacy/language.py", line 801, in add_pipe
    pipe_component = self.create_pipe(
  File "/Users/mitch/opt/miniconda3/envs/toxic/lib/python3.10/site-packages/spacy/language.py", line 680, in create_pipe
    resolved = registry.resolve(cfg, validate=validate)
  File "/Users/mitch/opt/miniconda3/envs/toxic/lib/python3.10/site-packages/confection/__init__.py", line 728, in resolve
    resolved, _ = cls._make(
  File "/Users/mitch/opt/miniconda3/envs/toxic/lib/python3.10/site-packages/confection/__init__.py", line 777, in _make
    filled, _, resolved = cls._fill(
  File "/Users/mitch/opt/miniconda3/envs/toxic/lib/python3.10/site-packages/confection/__init__.py", line 832, in _fill
    filled[key], validation[v_key], final[key] = cls._fill(
  File "/Users/mitch/opt/miniconda3/envs/toxic/lib/python3.10/site-packages/confection/__init__.py", line 831, in _fill
    promise_schema = cls.make_promise_schema(value, resolve=resolve)
  File "/Users/mitch/opt/miniconda3/envs/toxic/lib/python3.10/site-packages/confection/__init__.py", line 1023, in make_promise_schema
    func = cls.get(reg_name, func_name)
  File "/Users/mitch/opt/miniconda3/envs/toxic/lib/python3.10/site-packages/spacy/util.py", line 139, in get
    raise RegistryError(
catalogue.RegistryError: [E893] Could not find function 'spancat_char_scorer.v1' in function registry 'scorers'. If you're using a custom function, make sure the code is available. If the function is provided by a third-party package, e.g. spacy-transformers, make sure the package is installed in your environment.

Available names: spacy.attribute_ruler_scorer.v1, spacy.entity_linker_scorer.v1, spacy.entity_ruler_scorer.v1, spacy.lemmatizer_scorer.v1, spacy.morphologizer_scorer.v1, spacy.ner_scorer.v1, spacy.overlapping_labeled_spans_scorer.v1, spacy.parser_scorer.v1, spacy.senter_scorer.v1, spacy.spancat_scorer.v1, spacy.tagger_scorer.v1, spacy.textcat_multilabel_scorer.v1, spacy.textcat_scorer.v1```

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.