openai / transformer-debugger

MIT License
4.01k stars 231 forks source link

Unable to look up model info. Are you sure you're running an activation server for this dataset? Current URL: #22

Closed starlitsky2010 closed 4 months ago

starlitsky2010 commented 4 months ago

Hi OpenAI guys,

I also met this problem:

Step 1:
transformer-debugger$ export export OPENAI_API_KEY=sk-xxxxx transformer-debugger$ python neuron_explainer/activation_server/main.py --model_name gpt2-small --port 8005 Step 2:
transformer-debugger/neuron_viewer$ NEURON_VIEWER_ACTIVATION_SERVER_URL=http://10.0.80.43:8005 npm start

neuron-viewer@1.0.0 start parcel src/index.html --no-cache

Server running at http://localhost:1234 ✨ Built in 9.41s

Visit http://10.0.80.43:1234/, it prints:

Neuron viewer Loading...

Visit http://10.0.80.43:1234/gpt2-small/tdb_alpha

An error occurs: Error: Unable to look up model info. Are you sure you're running an activation server for this dataset? Current URL: http://10.0.80.43:8005

I didn't know why it always goes error here.

 15 export const fetchModelInfo = (
 16   setModelInfo: (info: ModelInfoResponse | null) => void,
 17   setError: (errorMessage: string | null) => void
 18 ) => {
 19   getModelInfo()
 20     .then((modelInfo) => {
 21       console.log("Got model info", modelInfo);
 22       setModelInfo(modelInfo);
 23     })
 24     .catch((_) => {
 25       const errorMessage =
 26         "Unable to look up model info. Are you sure you're running an activation server for this dataset? Cu    rrent URL: " +
 27         OpenAPI.BASE;
 28       console.log(errorMessage);
 29       setError(errorMessage);
 30     });
 31 };

Thanks

XinyuZhou2000 commented 4 months ago

hi, same problem. in neuron_viewer/src/requests/paths.ts try this:

export function getActivationServerUrl(): string {
  if (process.env.NEURON_VIEWER_ACTIVATION_SERVER_URL) {
    return process.env.NEURON_VIEWER_ACTIVATION_SERVER_URL;
  }
  return "http://localhost:8000";
}

 #change 0.0.0.0 into localhost

maybe you're using a school/company's internet

WuTheFWasThat commented 4 months ago

NEURON_VIEWER_ACTIVATION_SERVER_URL=http://localhost:8005 probably works too

starlitsky2010 commented 4 months ago

hi, same problem. in neuron_viewer/src/requests/paths.ts try this:

export function getActivationServerUrl(): string {
  if (process.env.NEURON_VIEWER_ACTIVATION_SERVER_URL) {
    return process.env.NEURON_VIEWER_ACTIVATION_SERVER_URL;
  }
  return "http://localhost:8000";
}

 #change 0.0.0.0 into localhost

maybe you're using a school/company's internet

This doesn't work by my side. Running the client browser on host machine leads no bug.