Giter Club home page Giter Club logo

Comments (13)

JingqingZ avatar JingqingZ commented on August 17, 2024

It seems you installed the wrong pegasus by pip. The steps described in #16 may help you set up in colab.

from pegasus.

matt9704 avatar matt9704 commented on August 17, 2024

Thanks

from pegasus.

sulata2 avatar sulata2 commented on August 17, 2024

Hi! I run your work on google colab. At this step:
!python3 pegasus/bin/train.py --params=aeslc_transformer \ --param_overrides=vocab_filename=ckpt/pegasus_ckpt/c4.unigram.newline.10pct.96000.model \ --train_init_checkpoint=ckpt/pegasus_ckpt/model.ckpt-1500000 \ --model_dir=ckpt/pegasus_ckpt/aeslc
The error comes up.
Traceback (most recent call last): File "pegasus/bin/train.py", line 17, in <module> from pegasus.data import infeed File "/usr/local/lib/python3.6/dist-packages/pegasus/__init__.py", line 1, in <module> from pegasus.parser import * File "/usr/local/lib/python3.6/dist-packages/pegasus/parser.py", line 10, in <module> from pegasus.rules import _build_rule, ParseError, Lazy File "/usr/local/lib/python3.6/dist-packages/pegasus/rules.py", line 62 print 'pegasus: {}\x1b[2;38;5;241menter {} -> {}\x1b[m'.format(depth, repr(char()), _name) ^ SyntaxError: invalid syntax

I am getting the same issue and if i do with pip install -e pegagus then tensorflow says to upgrage the version and the same issye with pegagus.. any help ?

from pegasus.

sulata2 avatar sulata2 commented on August 17, 2024

Hi! I run your work on google colab. At this step:
!python3 pegasus/bin/train.py --params=aeslc_transformer \ --param_overrides=vocab_filename=ckpt/pegasus_ckpt/c4.unigram.newline.10pct.96000.model \ --train_init_checkpoint=ckpt/pegasus_ckpt/model.ckpt-1500000 \ --model_dir=ckpt/pegasus_ckpt/aeslc
The error comes up.
Traceback (most recent call last): File "pegasus/bin/train.py", line 17, in <module> from pegasus.data import infeed File "/usr/local/lib/python3.6/dist-packages/pegasus/__init__.py", line 1, in <module> from pegasus.parser import * File "/usr/local/lib/python3.6/dist-packages/pegasus/parser.py", line 10, in <module> from pegasus.rules import _build_rule, ParseError, Lazy File "/usr/local/lib/python3.6/dist-packages/pegasus/rules.py", line 62 print 'pegasus: {}\x1b[2;38;5;241menter {} -> {}\x1b[m'.format(depth, repr(char()), _name) ^ SyntaxError: invalid syntax

how you fixed this issue ?

from pegasus.

sulata2 avatar sulata2 commented on August 17, 2024

It seems you installed the wrong pegasus by pip. The steps described in #16 may help you set up in colab.

I tried using as per #16 , but still i get the above issue invalid syntax (pegasus /rules.py). if i use (!pip3 install -e pegasus) ,it is asking to upgrade tensorflow and i upgrade tensorflow to 2.0 . then i get this syntax error.

from pegasus.

JingqingZ avatar JingqingZ commented on August 17, 2024

The pegasus that you have installed by pip install -e pegasus is NOT this pegasus. You will need to git clone the source code and then pip install.

from pegasus.

sulata2 avatar sulata2 commented on August 17, 2024

The pegasus that you have installed by pip install -e pegasus is NOT this pegasus. You will need to git clone the source code and then pip install.

I did git clone first then at end pip install pegagus ,but getting as above error .let me try again.

from pegasus.

sulata2 avatar sulata2 commented on August 17, 2024

The pegasus that you have installed by pip install -e pegasus is NOT this pegasus. You will need to git clone the source code and then pip install.

I am running with tensorflow 2.2.0 since pegagus is not accepting tensorflow 1.15.2 version ,so taking higher version of tensorflow. but getting the error "dist-packages/pegasus/rules.py", line 62 print 'pegasus: {}\x1b[2;38;5;241menter {} -> {}\x1b[m'.format(depth, repr(char()), _name) ^ SyntaxError: invalid syntax"

from pegasus.

sulata2 avatar sulata2 commented on August 17, 2024

I tried as you suggested .. after cloning github , then pip install pegasus still getting same issue .
!python3 pegasus/bin/train.py --params=aeslc_transformer
--param_overrides=vocab_filename=ckpt/pegasus_ckpt/c4.unigram.newline.10pct.96000.model
--train_init_checkpoint=ckpt/pegasus_ckpt/model.ckpt-1500000
--model_dir=ckpt/pegasus_ckpt/aeslc

Traceback (most recent call last):
File "pegasus/bin/train.py", line 17, in
from pegasus.data import infeed
File "/usr/local/lib/python3.7/dist-packages/pegasus/init.py", line 1, in
from pegasus.parser import *
File "/usr/local/lib/python3.7/dist-packages/pegasus/parser.py", line 10, in
from pegasus.rules import _build_rule, ParseError, Lazy
File "/usr/local/lib/python3.7/dist-packages/pegasus/rules.py", line 62
print 'pegasus: {}\x1b[2;38;5;241menter {} -> {}\x1b[m'.format(depth, repr(char()), _name)
^
SyntaxError: invalid syntax

from pegasus.

JingqingZ avatar JingqingZ commented on August 17, 2024

/usr/local/lib/python3.7/dist-packages/pegasus/rules.py

Again, your code is calling the pegasus that is not ours. Please make sure the other pegasus is uninstalled.

from pegasus.

sulata2 avatar sulata2 commented on August 17, 2024

/usr/local/lib/python3.7/dist-packages/pegasus/rules.py

Again, your code is calling the pegasus that is not ours. Please make sure the other pegasus is uninstalled.

Thank you for your guidance. one question : as per the readme link , i saw pegasus setuptools.setup(
name='pegasus',
version='0.0.1', ....

but when i try to install this version of pegagus , i am getting message this version not available but
ERROR: Could not find a version that satisfies the requirement pegasus==0.0.1 (from versions: 0.1.0, 0.1.1, 0.1.2, 0.1.3)
ERROR: No matching distribution found for pegasus==0.0.1 . so facing issue.. which version i should install ?

from pegasus.

sulata2 avatar sulata2 commented on August 17, 2024

Thank you . I got that pegasus 0.0.1 worked fine. I changed in setup.py(because in setup.py it was having earlier and ran with !pip install -e pegasus . worked. but facing some other tensorflow issue.ModuleNotFoundError: No module named 'tensorflow.contrib'.

from pegasus.

vzagde avatar vzagde commented on August 17, 2024

I am too getting the same error I installed pegasus using pip3 command and all the TensorFlow dependencies with the updated version, Not able to understand how I can resolve this

from pegasus.

Related Issues (20)

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.