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

About evaluate on GERBIL #63

Closed
BeerTai opened this issue Nov 24, 2020 · 11 comments
Closed

About evaluate on GERBIL #63

BeerTai opened this issue Nov 24, 2020 · 11 comments

Comments

@BeerTai
Copy link

BeerTai commented Nov 24, 2020

Hi, I am trying to reproduce the results on the GERBIL platform.
On my remote server, I start gerbil and receive Starting Coyote HTTP/1.1 on http-1235.
I also start the API,and set server_address = ("localhost", 5555).
Finally, I configure an experiment. Where the URI field be filled with:
http://remote_address:1235/gerbil-spotWrapNifWS4Test/myalgorithm.
When I click on the Add Annotator button, I get the error

Warning! There was an error while testing the annotator.
Exception while sending request.

what should I do?
Thanks~

@KDercksen
Copy link
Contributor

KDercksen commented Nov 27, 2020

It looks like port 1235 might not be opened to public access in your remote server. Forward it in your network settings so Gerbil can send/receive requests through that port.

@BeerTai
Copy link
Author

BeerTai commented Nov 28, 2020

Thank you for your reply. I checked the port of the remote server. We test port 1235 with the telnet command. Port 1235 is open.

@BeerTai
Copy link
Author

BeerTai commented Nov 30, 2020

When I migrate the code and data from remote to local and then execute it, I still get the same error. At the same time, the terminal did not output any errors or warnings. My api.py as follows:

from http.server import HTTPServer

from REL.entity_disambiguation import EntityDisambiguation
from REL.ner import Cmns, load_flair_ner
from REL.server import make_handler

wiki_version = "wiki_2014"
base_url = "/Users/beertai/Desktop/Entity_linking/REL-master/data"

config = {
    "mode": "eval",
    "model_path": "{}/{}/generated/model".format(base_url, wiki_version),  # or alias, see also tutorial 7: custom models
}

model = EntityDisambiguation(base_url, wiki_version, config)

# Using Flair:
tagger_ner = load_flair_ner("ner-fast")

# Alternatively, using n-grams:
tagger_ngram = Cmns(base_url, wiki_version, n=5)

server_address = ("127.0.0.1", 5555)
server = HTTPServer(
    server_address,
    make_handler(
        base_url, wiki_version, model, tagger_ner
    ),
)

try:
    print("Ready for listening.")
    server.serve_forever()
except KeyboardInterrupt:
    exit(0)

@mickvanhulst-TomTom
Copy link
Contributor

mickvanhulst-TomTom commented Nov 30, 2020

Hi @BeerTai, what about GERBIL middleware [0]? After running that, you should be able to verify if GERBIL is running correctly by going to the respective url [1]. I added a screenshot of what you should see. If this is not what you're seeing, then your port is not correctly setup.

Hope this helps 👍 !

image

[0] https://github.com/informagi/REL/blob/master/tutorials/03_Evaluate_Gerbil.md
[1] http://remote_address:1235/gerbil-spotWrapNifWS4Test/myalgorithm

@BeerTai
Copy link
Author

BeerTai commented Nov 30, 2020

Thank you for your reply! I can see the same screenshot as you. Data and code are local. The output of GERBIL middleware as follows:
Screen Shot 2020-11-30 at 3 14 47 PM
Screen Shot 2020-11-30 at 3 15 34 PM

@mickvanhulst-TomTom
Copy link
Contributor

Hi @BeerTai,

You are try to serve GERBIL requests to your local host, this address is only accessible from within your network. You will need to replace this with the a public IP address, which you can find by going to e.g.: https://whatismyipaddress.com/

@BeerTai
Copy link
Author

BeerTai commented Nov 30, 2020

Thanks for your reply! I get the same error.
Screen Shot 2020-11-30 at 3 39 49 PM
Screen Shot 2020-11-30 at 3 41 58 PM

@mickvanhulst-TomTom
Copy link
Contributor

Hi @BeerTai ,

Have you forwarded your port in your router settings?

@BeerTai
Copy link
Author

BeerTai commented Nov 30, 2020

Sorry, I don’t know much about the situation you mentioned, I’m directly connected to the campus network

@mickvanhulst-TomTom
Copy link
Contributor

Hi @BeerTai ,

Then you probably have to contact your network administrator and ask him about port forwarding [0]. This is not something we can help you with as it would require network access.

[0] https://en.wikipedia.org/wiki/Port_forwarding

@BeerTai
Copy link
Author

BeerTai commented Nov 30, 2020

Thank you very much for your answers!

@BeerTai BeerTai closed this as completed Nov 30, 2020
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

3 participants