meg-huggingface commited on
Commit
74d59fa
1 Parent(s): d4f49be

Endpoint name character limit

Browse files
Files changed (1) hide show
  1. main_backend_toxicity.py +3 -1
main_backend_toxicity.py CHANGED
@@ -66,7 +66,9 @@ def run_auto_eval():
66
 
67
  logger.info(f'Starting Evaluation of {eval_request.json_filepath} on Inference endpoints')
68
  model_repository = eval_request.model
69
- endpoint_name = re.sub("/", "-", model_repository.lower()) + "-toxicity-eval"
 
 
70
  endpoint_url = create_endpoint(endpoint_name, model_repository)
71
  logger.info("Created an endpoint url at %s" % endpoint_url)
72
  results = main(endpoint_url, eval_request)
 
66
 
67
  logger.info(f'Starting Evaluation of {eval_request.json_filepath} on Inference endpoints')
68
  model_repository = eval_request.model
69
+ endpoint_name_tmp = re.sub("/", "-", model_repository.lower()) + "-toxicity-eval"
70
+ # Endpoints apparently can't have more than 32 characters.
71
+ endpoint_name = endpoint_name_tmp[:32]
72
  endpoint_url = create_endpoint(endpoint_name, model_repository)
73
  logger.info("Created an endpoint url at %s" % endpoint_url)
74
  results = main(endpoint_url, eval_request)