Error when trying to run EON turner

When I try to run the EON tuner, I get this error:

Creating job... OK (ID: 2087423)

Calculating DSP performance estimates
Starting hyperparameter search...

Scheduling job in cluster...
Job started
Creating trials...
Error occured:
(401)
Reason: Unauthorized
HTTP response headers: HTTPHeaderDict({'Content-Type': 'application/json; charset=utf-8', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive', 'Date': 'Tue, 01 Feb 2022 07:44:33 GMT', 'Content-Security-Policy': "default-src 'self' blob: edgeimpulse.com *.edgeimpulse.com; img-src 'self' 'unsafe-inline' edgeimpulse.com *.edgeimpulse.com www.google-analytics.com data:; media-src 'self' edgeimpulse.com *.edgeimpulse.com * blob: data: mediastream:; script-src 'self'  'nonce-bY75/ihxRhuL+Bdt5BQItg==' edgeimpulse.com *.edgeimpulse.com *.hsforms.net *.hsforms.com www.google-analytics.com fonts.googleapis.com youtube.com *.youtube.com browser.sentry-cdn.com js.sentry-cdn.com *.sentry.io www.googletagmanager.com d3js.org blob:; connect-src 'self' edgeimpulse.com *.edgeimpulse.com www.google-analytics.com *.hsforms.net *.hsforms.com *.amazonaws.com *.googleapis.com fonts.googleapis.com sentry.io *.sentry.io youtube.com *.youtube.com *.doubleclick.net localhost:4810 docker.for.mac.localhost:9001 wss:; style-src 'self' 'unsafe-inline' edgeimpulse.com *.edgeimpulse.com fonts.googleapis.com; base-uri 'self' edgeimpulse.com *.edgeimpulse.com; frame-ancestors 'self' edgeimpulse.com *.edgeimpulse.com; form-action 'self' *; frame-src 'self' edgeimpulse.com *.edgeimpulse.com youtube.com *.youtube.com localhost:4820; font-src 'self' edgeimpulse.com *.edgeimpulse.com fonts.gstatic.com; report-uri https://o333795.ingest.sentry.io/api/1887001/security/?sentry_key=3ad6405147234fac8ab65061c25d2334;", 'X-Content-Type-Options': 'nosniff', 'X-Frame-Options': 'DENY', 'X-XSS-Protection': '1; mode=block', 'Referrer-Policy': 'strict-origin', 'Strict-Transport-Security': 'max-age=63072000', 'Access-Control-Allow-Origin': '*', 'Cache-Control': 's-maxage=0,public,no-cache,no-store,must-revalidate', 'Vary': 'Accept-Encoding', 'Set-Cookie': 'connect.sid=s%3AAwjUmKhHNCQ-if7MWvc7He-XSXcWN_3z.lnXJIrJ3dACNwCn5k8%2BgkYsFx1zNt25a3OkgoHZpLww; Path=/; HttpOnly', 'X-Cache': 'Error from cloudfront', 'Via': '1.1 16f38d6df135d34d67fe44df60d91ab4.cloudfront.net (CloudFront)', 'X-Amz-Cf-Pop': 'LHR61-P1', 'X-Amz-Cf-Id': 'lNpjaqHG8Z2OAgapYl9sJVTJfYPR0mUGe-4tOQppSiE2gOVeUTzqHA=='})
HTTP response body: {"success":false,"error":"Invalid API key"}

Traceback (most recent call last):
  File "/home/tuner/ei_tuner/tuner_chief.py", line 242, in search
    trial = self.oracle.create_trial(ix)
  File "/usr/local/lib/python3.8/dist-packages/kerastuner/engine/oracle.py", line 165, in create_trial
    response = self._populate_space(trial_id)
  File "/home/tuner/ei_tuner/tuner_chief.py", line 137, in _populate_space
    values = self._random_values()
  File "/home/tuner/ei_tuner/tuner_chief.py", line 114, in _random_values
    res = self.api_instance.score_trial(self.project_id, {
  File "/usr/local/lib/python3.8/dist-packages/edge_impulse_sdk/api/optimization_api.py", line 291, in score_trial
    return self.score_trial_with_http_info(project_id, tuner_trial, **kwargs)  # noqa: E501
  File "/usr/local/lib/python3.8/dist-packages/edge_impulse_sdk/api/optimization_api.py", line 371, in score_trial_with_http_info
    return self.api_client.call_api(
  File "/usr/local/lib/python3.8/dist-packages/edge_impulse_sdk/api_client.py", line 337, in call_api
    return self.__call_api(resource_path, method,
  File "/usr/local/lib/python3.8/dist-packages/edge_impulse_sdk/api_client.py", line 169, in __call_api
    response_data = self.request(
  File "/usr/local/lib/python3.8/dist-packages/edge_impulse_sdk/api_client.py", line 380, in request
    return self.rest_client.POST(url,
  File "/usr/local/lib/python3.8/dist-packages/edge_impulse_sdk/rest.py", line 270, in POST
    return self.request("POST", url,
  File "/usr/local/lib/python3.8/dist-packages/edge_impulse_sdk/rest.py", line 229, in request
    raise ApiException(http_resp=r)
edge_impulse_sdk.exceptions.ApiException: (401)
Reason: Unauthorized
HTTP response headers: HTTPHeaderDict({'Content-Type': 'application/json; charset=utf-8', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive', 'Date': 'Tue, 01 Feb 2022 07:44:33 GMT', 'Content-Security-Policy': "default-src 'self' blob: edgeimpulse.com *.edgeimpulse.com; img-src 'self' 'unsafe-inline' edgeimpulse.com *.edgeimpulse.com www.google-analytics.com data:; media-src 'self' edgeimpulse.com *.edgeimpulse.com * blob: data: mediastream:; script-src 'self'  'nonce-bY75/ihxRhuL+Bdt5BQItg==' edgeimpulse.com *.edgeimpulse.com *.hsforms.net *.hsforms.com www.google-analytics.com fonts.googleapis.com youtube.com *.youtube.com browser.sentry-cdn.com js.sentry-cdn.com *.sentry.io www.googletagmanager.com d3js.org blob:; connect-src 'self' edgeimpulse.com *.edgeimpulse.com www.google-analytics.com *.hsforms.net *.hsforms.com *.amazonaws.com *.googleapis.com fonts.googleapis.com sentry.io *.sentry.io youtube.com *.youtube.com *.doubleclick.net localhost:4810 docker.for.mac.localhost:9001 wss:; style-src 'self' 'unsafe-inline' edgeimpulse.com *.edgeimpulse.com fonts.googleapis.com; base-uri 'self' edgeimpulse.com *.edgeimpulse.com; frame-ancestors 'self' edgeimpulse.com *.edgeimpulse.com; form-action 'self' *; frame-src 'self' edgeimpulse.com *.edgeimpulse.com youtube.com *.youtube.com localhost:4820; font-src 'self' edgeimpulse.com *.edgeimpulse.com fonts.gstatic.com; report-uri https://o333795.ingest.sentry.io/api/1887001/security/?sentry_key=3ad6405147234fac8ab65061c25d2334;", 'X-Content-Type-Options': 'nosniff', 'X-Frame-Options': 'DENY', 'X-XSS-Protection': '1; mode=block', 'Referrer-Policy': 'strict-origin', 'Strict-Transport-Security': 'max-age=63072000', 'Access-Control-Allow-Origin': '*', 'Cache-Control': 's-maxage=0,public,no-cache,no-store,must-revalidate', 'Vary': 'Accept-Encoding', 'Set-Cookie': 'connect.sid=s%3AAwjUmKhHNCQ-if7MWvc7He-XSXcWN_3z.lnXJIrJ3dACNwCn5k8%2BgkYsFx1zNt25a3OkgoHZpLww; Path=/; HttpOnly', 'X-Cache': 'Error from cloudfront', 'Via': '1.1 16f38d6df135d34d67fe44df60d91ab4.cloudfront.net (CloudFront)', 'X-Amz-Cf-Pop': 'LHR61-P1', 'X-Amz-Cf-Id': 'lNpjaqHG8Z2OAgapYl9sJVTJfYPR0mUGe-4tOQppSiE2gOVeUTzqHA=='})
HTTP response body: {"success":false,"error":"Invalid API key"}


During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/tuner/tuner.py", line 227, in <module>
    main_function()
  File "/home/tuner/tuner.py", line 220, in main_function
    model = train_model(None, None, None, [],
  File "/home/tuner/tuner.py", line 201, in train_model
    tuner.search(train_dataset, epochs=100, validation_data=validation_dataset, validation_data_orig=validation_dataset_orig, verbose=2, callbacks=callbacks, x_train=X_train, y_test=Y_test, specific_input_shape=None, classes_values=classes_values, classes_values_test=classes_values_test, input_configs=input_configs, mode='classification', prepare_model_tf_lite=prepare_tflite_template, prepare_model_tf_lite_eon=prepare_tflite_eon_template)
  File "/home/tuner/ei_tuner/tuner_chief.py", line 282, in search
    self.sio.emit('tuner-job-message', {
AttributeError: 'TunerChief' object has no attribute 'sio'

Application exited with code 1 (Error)

Job failed (see above)

My ID is: 77234

Hello @andreas.bomholtz,

This is an error I have been experiencing too when I created an ingestion key.
I’ll let the EON tuner team know that you experienced the issue too.
Can you create a new admin API key in your project, it should solve the issue.

Best regards,

Louis

Hello Louis,

It worked, thank you :slight_smile:

1 Like