Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@plac.annotations - SyntaxError #2

Open
avissens opened this issue Sep 17, 2018 · 6 comments
Open

@plac.annotations - SyntaxError #2

avissens opened this issue Sep 17, 2018 · 6 comments

Comments

@avissens
Copy link

Hi!
@plac.annotations cell gives me this error:

File "<ipython-input-293-72f554ad94b1>", line 5 n_iter=("Number of training iterations", "option", "n", int)) ^ SyntaxError: unexpected EOF while parsing

Any suggestion why? I'm using Python 3.

@kwokfong29
Copy link

Removing the plac.annotations decorator and converting plac.call(main) into main() might do the trick. im guessing its a similar syntax error when run on jupyter-notebook. https://stackoverflow.com/questions/52384517/training-a-new-entity-type-with-spacy

@Shrivarsheni
Copy link

I am facing the same error , I want to execute (https://github.com/explosion/spaCy/tree/master/examples/training)

this in Google colab or Jupyter. How to remove the plac.annotations

@pranay-anchan
Copy link

Removing the plac.annotations decorator and converting plac.call(main) into main() might do the trick. im guessing its a similar syntax error when run on jupyter-notebook. https://stackoverflow.com/questions/52384517/training-a-new-entity-type-with-spacy

Could you show an example of this?

@kwokfong29
Copy link

Removing the plac.annotations decorator and converting plac.call(main) into main() might do the trick. im guessing its a similar syntax error when run on jupyter-notebook. https://stackoverflow.com/questions/52384517/training-a-new-entity-type-with-spacy

Could you show an example of this?

I am afraid I can't do that anymore, the document I was working on got overwritten a year ago. But if you have any issues, would be happy to help

@MahimaBarot
Copy link

Removing the plac.annotations decorator and converting plac.call(main) into main() might do the trick. im guessing its a similar syntax error when run on jupyter-notebook. https://stackoverflow.com/questions/52384517/training-a-new-entity-type-with-spacy

Could you show an example of this?

I am afraid I can't do that anymore, the document I was working on got overwritten a year ago. But if you have any issues, would be happy t

Removing the plac.annotations decorator and converting plac.call(main) into main() might do the trick. im guessing its a similar syntax error when run on jupyter-notebook. https://stackoverflow.com/questions/52384517/training-a-new-entity-type-with-spacy

Could you show an example of this?

I am afraid I can't do that anymore, the document I was working on got overwritten a year ago. But if you have any issues, would be happy to help

I am still not getting about main(). can you show a piece of code?

@kwokfong29
Copy link

@MahimaBarot would love to, but as mentioned above, the documents I have worked on got overwritten. Plus, the python script provided by the developers are no longer available. If you have a sample script that you were working on then that would be helpful...

At best, the last I could recall and any resemblance of the code at the end looks something like this.

if __name__ == '__main__':
    import plac
    plac.call(main)

drop the plac.call function and call the main function directly, as such.

if __name__ == '__main__':
    main()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants