# HF Inference Endpoints don't finish Initializing

**URL:** <https://discuss.huggingface.co/t/hf-inference-endpoints-dont-finish-initializing/79172>\
**Category:** Inference Endpoints on the Hub\
**Created:** [March 28, 2024, 5:49pm UTC](https://discuss.huggingface.co/t/hf-inference-endpoints-dont-finish-initializing/79172 "2024-03-28T17:49:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sunitha-ravi](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/sunitha-ravi/32/25254_2.png) [@sunitha-ravi](https://discuss.huggingface.co/u/sunitha-ravi)\
**Post date:** [March 28, 2024, 5:49pm UTC](https://discuss.huggingface.co/t/hf-inference-endpoints-dont-finish-initializing/79172/1 "2024-03-28T17:49:49Z")

</div>

I am creating an inference endpoint using the HfApi. I created a few endpoints using the create\_inference\_endpoint() method. The endpoints never finish initializing though and I am unable to view the logs as well.

I am using the following code:

```auto
api = HfApi(token="")
endpoint = api.create_inference_endpoint(
            endpoint_name,
            repository="gpt2",
            framework="custom",
            task="text-generation",
            accelerator="cpu",
            instance_size="large",
            instance_type="c6i",
            region="us-east-1",
            vendor="aws",
            type="protected",
            namespace=""
        )

```
