Code Monkey home page Code Monkey logo

ccgtools's People

Contributors

stanojevic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

mahaalkh

ccgtools's Issues

Unable to load pretrained English parser in demo.ipynb

I attempted to run the cells in notebooks/demo.ipynb sequentially using Google Colab.
However, I encountered an issue when loading the pretrained RoBERTa parser.
I was able to use the same command without any issues before.
The error message I received is as follows:

RuntimeError: Error(s) in loading state_dict for Model:
Unexpected key(s) in state_dict: "embedder.model.embeddings.position_ids".

I would greatly appreciate it if you could fix this! Thank you!

ValueError: Cannot set different distribution kind to the same parameter name.

I met a problem with loading pre-trained models (English-RoBERTa.ckpt)

File "/Conda/envs/ccgparser/bin/ccg-parser", line 8, in
sys.exit(parse())
File "/Conda/envs/ccgparser/lib/python3.7/site-packages/ccg/supertagger/main.py", line 87, in parse
parser = _load_and_setup_model(args, parsing=True)
File "/Conda/envs/ccgparser/lib/python3.7/site-packages/ccg/supertagger/main.py", line 28, in _load_and_setup_model
num_cpus=num_cpus)
File "/Conda/envs/ccgparser/lib/python3.7/site-packages/ccg/supertagger/parser.py", line 21, in init
self.model = Model.load_model(model_file)
File "/Conda/envs/ccgparser/lib/python3.7/site-packages/ccg/supertagger/model.py", line 238, in load_model
model = Model.load_from_checkpoint(checkpoint_path=model_file)
File "/Conda/envs/ccgparser/lib/python3.7/site-packages/pytorch_lightning/core/saving.py", line 143, in load_from_checkpoint
**kwargs,
File "/Conda/envs/ccgparser/lib/python3.7/site-packages/pytorch_lightning/core/saving.py", line 180, in _load_from_checkpoint
return _load_state(cls, checkpoint, strict=strict, kwargs)
File "/Conda/envs/ccgparser/lib/python3.7/site-packages/pytorch_lightning/core/saving.py", line 225, in _load_state
obj = cls(
_cls_kwargs)
File "/Conda/envs/ccgparser/lib/python3.7/site-packages/ccg/supertagger/model.py", line 42, in init
self.lr = trial.suggest_loguniform("lr", 1e-5, 0.01)
File "/Conda/envs/ccgparser/lib/python3.7/site-packages/optuna/_deprecated.py", line 113, in wrapper
return func(*args, **kwargs)
File "/Conda/envs/ccgparser/lib/python3.7/site-packages/optuna/trial/_fixed.py", line 89, in suggest_loguniform
return self.suggest_float(name, low, high, log=True)
File "/Conda/envs/ccgparser/lib/python3.7/site-packages/optuna/trial/_fixed.py", line 79, in suggest_float
return self._suggest(name, FloatDistribution(low, high, log=log, step=step))
File "/Conda/envs/ccgparser/lib/python3.7/site-packages/optuna/trial/_fixed.py", line 138, in _suggest
distributions.check_distribution_compatibility(self._distributions[name], distribution)
File "/Conda/envs/ccgparser/lib/python3.7/site-packages/optuna/distributions.py", line 639, in check_distribution_compatibility
raise ValueError("Cannot set different distribution kind to the same parameter name.")
ValueError: Cannot set different distribution kind to the same parameter name.

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.