Can you upload model (Python SDK) to specific Impulse?

Question: While uploading a model to an Edge Impulse project using the Python SDK, is it possible to upload to a specific Impulse? Or does BYOM upload a model to the first Impulse?

I have experimented by having other Impulses (2,3 or 5) in my project as the selected ones but even when I profile a model with the Python SDK, I see that it is uploaded to the first Impulse.

Hi @SoloGithu,

I just tried something.
The Python SDK uploads your model to your selected impulse.

So if you change the impulse selected in the UI, it will use this impulse.

Here is one quick around, create a new empty impulse before uploading your model:

import requests

# Construct the URL with the project ID
url = f"https://studio.edgeimpulse.com/v1/api/{PROJECT_ID}/impulse/new"

# Make the POST request
response = requests.post(
    url,
    headers={"x-api-key": ei.API_KEY, "Accept": "*/*"},
)

# Print the status code and response content for debugging
print("Status Code:", response.status_code)
print("Response Content:", response.text)

# If the response is successful, parse the JSON
if response.status_code == 200:
    try:
        data = response.json()
        print("Response JSON:", data)
    except ValueError:
        print("Response content is not valid JSON")
else:
    print("Request failed with status code:", response.status_code)

Here is the API endpoint doc:

Let me know if that helps, in the meantime. I’ll create a feature request to add the ability to select the impulse in the Python SDK directly. Thanks for flagging this.

Best,

Louis