curl --request POST \
--url https://studio.edgeimpulse.com/v1/api/{projectId}/optimize/config \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"targetLatency": 0,
"targetDevice": {
"name": "cortex-m4f-80mhz",
"ram": 1024,
"rom": 1024
},
"name": "<string>",
"compiler": [
"<string>"
],
"precision": [
"<string>"
],
"trainingCycles": 5,
"tuningMaxTrials": 2,
"tuningWorkers": 1,
"initialTrials": 5,
"optimizationRounds": 3,
"trialsPerOptimizationRound": 3,
"minMACCS": 123,
"maxMACCS": 123,
"notificationOnCompletion": true,
"importProjectMetrics": true,
"importResourceMetrics": true,
"numImportProjectMetrics": 123,
"numImportResourceMetrics": 123,
"enableSEM": true,
"accuracySEM": 123,
"latencySEM": 123,
"optimizationObjectives": [
{
"objective": "<string>",
"label": "<string>",
"weight": 123
}
],
"rawObjectives": "<string>",
"earlyStopping": true,
"earlyStoppingWindowSize": 123,
"earlyStoppingImprovementBar": 123,
"MOMF": true,
"verboseLogging": true,
"disableConstraints": true,
"disableDeduplicate": true,
"maxTotalTrainingTime": 123,
"tunerChildJobMemoryMiB": 32768,
"tunerSpaceOptions": {},
"space": [
{
"inputBlocks": [
{}
],
"dspBlocks": [
{}
],
"learnBlocks": [
[
{}
]
],
"parameters": {}
}
]
}
'import requests
url = "https://studio.edgeimpulse.com/v1/api/{projectId}/optimize/config"
payload = {
"targetLatency": 0,
"targetDevice": {
"name": "cortex-m4f-80mhz",
"ram": 1024,
"rom": 1024
},
"name": "<string>",
"compiler": ["<string>"],
"precision": ["<string>"],
"trainingCycles": 5,
"tuningMaxTrials": 2,
"tuningWorkers": 1,
"initialTrials": 5,
"optimizationRounds": 3,
"trialsPerOptimizationRound": 3,
"minMACCS": 123,
"maxMACCS": 123,
"notificationOnCompletion": True,
"importProjectMetrics": True,
"importResourceMetrics": True,
"numImportProjectMetrics": 123,
"numImportResourceMetrics": 123,
"enableSEM": True,
"accuracySEM": 123,
"latencySEM": 123,
"optimizationObjectives": [
{
"objective": "<string>",
"label": "<string>",
"weight": 123
}
],
"rawObjectives": "<string>",
"earlyStopping": True,
"earlyStoppingWindowSize": 123,
"earlyStoppingImprovementBar": 123,
"MOMF": True,
"verboseLogging": True,
"disableConstraints": True,
"disableDeduplicate": True,
"maxTotalTrainingTime": 123,
"tunerChildJobMemoryMiB": 32768,
"tunerSpaceOptions": {},
"space": [
{
"inputBlocks": [{}],
"dspBlocks": [{}],
"learnBlocks": [[{}]],
"parameters": {}
}
]
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
targetLatency: 0,
targetDevice: {name: 'cortex-m4f-80mhz', ram: 1024, rom: 1024},
name: '<string>',
compiler: ['<string>'],
precision: ['<string>'],
trainingCycles: 5,
tuningMaxTrials: 2,
tuningWorkers: 1,
initialTrials: 5,
optimizationRounds: 3,
trialsPerOptimizationRound: 3,
minMACCS: 123,
maxMACCS: 123,
notificationOnCompletion: true,
importProjectMetrics: true,
importResourceMetrics: true,
numImportProjectMetrics: 123,
numImportResourceMetrics: 123,
enableSEM: true,
accuracySEM: 123,
latencySEM: 123,
optimizationObjectives: [{objective: '<string>', label: '<string>', weight: 123}],
rawObjectives: '<string>',
earlyStopping: true,
earlyStoppingWindowSize: 123,
earlyStoppingImprovementBar: 123,
MOMF: true,
verboseLogging: true,
disableConstraints: true,
disableDeduplicate: true,
maxTotalTrainingTime: 123,
tunerChildJobMemoryMiB: 32768,
tunerSpaceOptions: {},
space: [{inputBlocks: [{}], dspBlocks: [{}], learnBlocks: [[{}]], parameters: {}}]
})
};
fetch('https://studio.edgeimpulse.com/v1/api/{projectId}/optimize/config', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://studio.edgeimpulse.com/v1/api/{projectId}/optimize/config",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'targetLatency' => 0,
'targetDevice' => [
'name' => 'cortex-m4f-80mhz',
'ram' => 1024,
'rom' => 1024
],
'name' => '<string>',
'compiler' => [
'<string>'
],
'precision' => [
'<string>'
],
'trainingCycles' => 5,
'tuningMaxTrials' => 2,
'tuningWorkers' => 1,
'initialTrials' => 5,
'optimizationRounds' => 3,
'trialsPerOptimizationRound' => 3,
'minMACCS' => 123,
'maxMACCS' => 123,
'notificationOnCompletion' => true,
'importProjectMetrics' => true,
'importResourceMetrics' => true,
'numImportProjectMetrics' => 123,
'numImportResourceMetrics' => 123,
'enableSEM' => true,
'accuracySEM' => 123,
'latencySEM' => 123,
'optimizationObjectives' => [
[
'objective' => '<string>',
'label' => '<string>',
'weight' => 123
]
],
'rawObjectives' => '<string>',
'earlyStopping' => true,
'earlyStoppingWindowSize' => 123,
'earlyStoppingImprovementBar' => 123,
'MOMF' => true,
'verboseLogging' => true,
'disableConstraints' => true,
'disableDeduplicate' => true,
'maxTotalTrainingTime' => 123,
'tunerChildJobMemoryMiB' => 32768,
'tunerSpaceOptions' => [
],
'space' => [
[
'inputBlocks' => [
[
]
],
'dspBlocks' => [
[
]
],
'learnBlocks' => [
[
[
]
]
],
'parameters' => [
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://studio.edgeimpulse.com/v1/api/{projectId}/optimize/config"
payload := strings.NewReader("{\n \"targetLatency\": 0,\n \"targetDevice\": {\n \"name\": \"cortex-m4f-80mhz\",\n \"ram\": 1024,\n \"rom\": 1024\n },\n \"name\": \"<string>\",\n \"compiler\": [\n \"<string>\"\n ],\n \"precision\": [\n \"<string>\"\n ],\n \"trainingCycles\": 5,\n \"tuningMaxTrials\": 2,\n \"tuningWorkers\": 1,\n \"initialTrials\": 5,\n \"optimizationRounds\": 3,\n \"trialsPerOptimizationRound\": 3,\n \"minMACCS\": 123,\n \"maxMACCS\": 123,\n \"notificationOnCompletion\": true,\n \"importProjectMetrics\": true,\n \"importResourceMetrics\": true,\n \"numImportProjectMetrics\": 123,\n \"numImportResourceMetrics\": 123,\n \"enableSEM\": true,\n \"accuracySEM\": 123,\n \"latencySEM\": 123,\n \"optimizationObjectives\": [\n {\n \"objective\": \"<string>\",\n \"label\": \"<string>\",\n \"weight\": 123\n }\n ],\n \"rawObjectives\": \"<string>\",\n \"earlyStopping\": true,\n \"earlyStoppingWindowSize\": 123,\n \"earlyStoppingImprovementBar\": 123,\n \"MOMF\": true,\n \"verboseLogging\": true,\n \"disableConstraints\": true,\n \"disableDeduplicate\": true,\n \"maxTotalTrainingTime\": 123,\n \"tunerChildJobMemoryMiB\": 32768,\n \"tunerSpaceOptions\": {},\n \"space\": [\n {\n \"inputBlocks\": [\n {}\n ],\n \"dspBlocks\": [\n {}\n ],\n \"learnBlocks\": [\n [\n {}\n ]\n ],\n \"parameters\": {}\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://studio.edgeimpulse.com/v1/api/{projectId}/optimize/config")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"targetLatency\": 0,\n \"targetDevice\": {\n \"name\": \"cortex-m4f-80mhz\",\n \"ram\": 1024,\n \"rom\": 1024\n },\n \"name\": \"<string>\",\n \"compiler\": [\n \"<string>\"\n ],\n \"precision\": [\n \"<string>\"\n ],\n \"trainingCycles\": 5,\n \"tuningMaxTrials\": 2,\n \"tuningWorkers\": 1,\n \"initialTrials\": 5,\n \"optimizationRounds\": 3,\n \"trialsPerOptimizationRound\": 3,\n \"minMACCS\": 123,\n \"maxMACCS\": 123,\n \"notificationOnCompletion\": true,\n \"importProjectMetrics\": true,\n \"importResourceMetrics\": true,\n \"numImportProjectMetrics\": 123,\n \"numImportResourceMetrics\": 123,\n \"enableSEM\": true,\n \"accuracySEM\": 123,\n \"latencySEM\": 123,\n \"optimizationObjectives\": [\n {\n \"objective\": \"<string>\",\n \"label\": \"<string>\",\n \"weight\": 123\n }\n ],\n \"rawObjectives\": \"<string>\",\n \"earlyStopping\": true,\n \"earlyStoppingWindowSize\": 123,\n \"earlyStoppingImprovementBar\": 123,\n \"MOMF\": true,\n \"verboseLogging\": true,\n \"disableConstraints\": true,\n \"disableDeduplicate\": true,\n \"maxTotalTrainingTime\": 123,\n \"tunerChildJobMemoryMiB\": 32768,\n \"tunerSpaceOptions\": {},\n \"space\": [\n {\n \"inputBlocks\": [\n {}\n ],\n \"dspBlocks\": [\n {}\n ],\n \"learnBlocks\": [\n [\n {}\n ]\n ],\n \"parameters\": {}\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://studio.edgeimpulse.com/v1/api/{projectId}/optimize/config")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"targetLatency\": 0,\n \"targetDevice\": {\n \"name\": \"cortex-m4f-80mhz\",\n \"ram\": 1024,\n \"rom\": 1024\n },\n \"name\": \"<string>\",\n \"compiler\": [\n \"<string>\"\n ],\n \"precision\": [\n \"<string>\"\n ],\n \"trainingCycles\": 5,\n \"tuningMaxTrials\": 2,\n \"tuningWorkers\": 1,\n \"initialTrials\": 5,\n \"optimizationRounds\": 3,\n \"trialsPerOptimizationRound\": 3,\n \"minMACCS\": 123,\n \"maxMACCS\": 123,\n \"notificationOnCompletion\": true,\n \"importProjectMetrics\": true,\n \"importResourceMetrics\": true,\n \"numImportProjectMetrics\": 123,\n \"numImportResourceMetrics\": 123,\n \"enableSEM\": true,\n \"accuracySEM\": 123,\n \"latencySEM\": 123,\n \"optimizationObjectives\": [\n {\n \"objective\": \"<string>\",\n \"label\": \"<string>\",\n \"weight\": 123\n }\n ],\n \"rawObjectives\": \"<string>\",\n \"earlyStopping\": true,\n \"earlyStoppingWindowSize\": 123,\n \"earlyStoppingImprovementBar\": 123,\n \"MOMF\": true,\n \"verboseLogging\": true,\n \"disableConstraints\": true,\n \"disableDeduplicate\": true,\n \"maxTotalTrainingTime\": 123,\n \"tunerChildJobMemoryMiB\": 32768,\n \"tunerSpaceOptions\": {},\n \"space\": [\n {\n \"inputBlocks\": [\n {}\n ],\n \"dspBlocks\": [\n {}\n ],\n \"learnBlocks\": [\n [\n {}\n ]\n ],\n \"parameters\": {}\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"error": "<string>"
}Update config
Update config
curl --request POST \
--url https://studio.edgeimpulse.com/v1/api/{projectId}/optimize/config \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"targetLatency": 0,
"targetDevice": {
"name": "cortex-m4f-80mhz",
"ram": 1024,
"rom": 1024
},
"name": "<string>",
"compiler": [
"<string>"
],
"precision": [
"<string>"
],
"trainingCycles": 5,
"tuningMaxTrials": 2,
"tuningWorkers": 1,
"initialTrials": 5,
"optimizationRounds": 3,
"trialsPerOptimizationRound": 3,
"minMACCS": 123,
"maxMACCS": 123,
"notificationOnCompletion": true,
"importProjectMetrics": true,
"importResourceMetrics": true,
"numImportProjectMetrics": 123,
"numImportResourceMetrics": 123,
"enableSEM": true,
"accuracySEM": 123,
"latencySEM": 123,
"optimizationObjectives": [
{
"objective": "<string>",
"label": "<string>",
"weight": 123
}
],
"rawObjectives": "<string>",
"earlyStopping": true,
"earlyStoppingWindowSize": 123,
"earlyStoppingImprovementBar": 123,
"MOMF": true,
"verboseLogging": true,
"disableConstraints": true,
"disableDeduplicate": true,
"maxTotalTrainingTime": 123,
"tunerChildJobMemoryMiB": 32768,
"tunerSpaceOptions": {},
"space": [
{
"inputBlocks": [
{}
],
"dspBlocks": [
{}
],
"learnBlocks": [
[
{}
]
],
"parameters": {}
}
]
}
'import requests
url = "https://studio.edgeimpulse.com/v1/api/{projectId}/optimize/config"
payload = {
"targetLatency": 0,
"targetDevice": {
"name": "cortex-m4f-80mhz",
"ram": 1024,
"rom": 1024
},
"name": "<string>",
"compiler": ["<string>"],
"precision": ["<string>"],
"trainingCycles": 5,
"tuningMaxTrials": 2,
"tuningWorkers": 1,
"initialTrials": 5,
"optimizationRounds": 3,
"trialsPerOptimizationRound": 3,
"minMACCS": 123,
"maxMACCS": 123,
"notificationOnCompletion": True,
"importProjectMetrics": True,
"importResourceMetrics": True,
"numImportProjectMetrics": 123,
"numImportResourceMetrics": 123,
"enableSEM": True,
"accuracySEM": 123,
"latencySEM": 123,
"optimizationObjectives": [
{
"objective": "<string>",
"label": "<string>",
"weight": 123
}
],
"rawObjectives": "<string>",
"earlyStopping": True,
"earlyStoppingWindowSize": 123,
"earlyStoppingImprovementBar": 123,
"MOMF": True,
"verboseLogging": True,
"disableConstraints": True,
"disableDeduplicate": True,
"maxTotalTrainingTime": 123,
"tunerChildJobMemoryMiB": 32768,
"tunerSpaceOptions": {},
"space": [
{
"inputBlocks": [{}],
"dspBlocks": [{}],
"learnBlocks": [[{}]],
"parameters": {}
}
]
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
targetLatency: 0,
targetDevice: {name: 'cortex-m4f-80mhz', ram: 1024, rom: 1024},
name: '<string>',
compiler: ['<string>'],
precision: ['<string>'],
trainingCycles: 5,
tuningMaxTrials: 2,
tuningWorkers: 1,
initialTrials: 5,
optimizationRounds: 3,
trialsPerOptimizationRound: 3,
minMACCS: 123,
maxMACCS: 123,
notificationOnCompletion: true,
importProjectMetrics: true,
importResourceMetrics: true,
numImportProjectMetrics: 123,
numImportResourceMetrics: 123,
enableSEM: true,
accuracySEM: 123,
latencySEM: 123,
optimizationObjectives: [{objective: '<string>', label: '<string>', weight: 123}],
rawObjectives: '<string>',
earlyStopping: true,
earlyStoppingWindowSize: 123,
earlyStoppingImprovementBar: 123,
MOMF: true,
verboseLogging: true,
disableConstraints: true,
disableDeduplicate: true,
maxTotalTrainingTime: 123,
tunerChildJobMemoryMiB: 32768,
tunerSpaceOptions: {},
space: [{inputBlocks: [{}], dspBlocks: [{}], learnBlocks: [[{}]], parameters: {}}]
})
};
fetch('https://studio.edgeimpulse.com/v1/api/{projectId}/optimize/config', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://studio.edgeimpulse.com/v1/api/{projectId}/optimize/config",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'targetLatency' => 0,
'targetDevice' => [
'name' => 'cortex-m4f-80mhz',
'ram' => 1024,
'rom' => 1024
],
'name' => '<string>',
'compiler' => [
'<string>'
],
'precision' => [
'<string>'
],
'trainingCycles' => 5,
'tuningMaxTrials' => 2,
'tuningWorkers' => 1,
'initialTrials' => 5,
'optimizationRounds' => 3,
'trialsPerOptimizationRound' => 3,
'minMACCS' => 123,
'maxMACCS' => 123,
'notificationOnCompletion' => true,
'importProjectMetrics' => true,
'importResourceMetrics' => true,
'numImportProjectMetrics' => 123,
'numImportResourceMetrics' => 123,
'enableSEM' => true,
'accuracySEM' => 123,
'latencySEM' => 123,
'optimizationObjectives' => [
[
'objective' => '<string>',
'label' => '<string>',
'weight' => 123
]
],
'rawObjectives' => '<string>',
'earlyStopping' => true,
'earlyStoppingWindowSize' => 123,
'earlyStoppingImprovementBar' => 123,
'MOMF' => true,
'verboseLogging' => true,
'disableConstraints' => true,
'disableDeduplicate' => true,
'maxTotalTrainingTime' => 123,
'tunerChildJobMemoryMiB' => 32768,
'tunerSpaceOptions' => [
],
'space' => [
[
'inputBlocks' => [
[
]
],
'dspBlocks' => [
[
]
],
'learnBlocks' => [
[
[
]
]
],
'parameters' => [
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://studio.edgeimpulse.com/v1/api/{projectId}/optimize/config"
payload := strings.NewReader("{\n \"targetLatency\": 0,\n \"targetDevice\": {\n \"name\": \"cortex-m4f-80mhz\",\n \"ram\": 1024,\n \"rom\": 1024\n },\n \"name\": \"<string>\",\n \"compiler\": [\n \"<string>\"\n ],\n \"precision\": [\n \"<string>\"\n ],\n \"trainingCycles\": 5,\n \"tuningMaxTrials\": 2,\n \"tuningWorkers\": 1,\n \"initialTrials\": 5,\n \"optimizationRounds\": 3,\n \"trialsPerOptimizationRound\": 3,\n \"minMACCS\": 123,\n \"maxMACCS\": 123,\n \"notificationOnCompletion\": true,\n \"importProjectMetrics\": true,\n \"importResourceMetrics\": true,\n \"numImportProjectMetrics\": 123,\n \"numImportResourceMetrics\": 123,\n \"enableSEM\": true,\n \"accuracySEM\": 123,\n \"latencySEM\": 123,\n \"optimizationObjectives\": [\n {\n \"objective\": \"<string>\",\n \"label\": \"<string>\",\n \"weight\": 123\n }\n ],\n \"rawObjectives\": \"<string>\",\n \"earlyStopping\": true,\n \"earlyStoppingWindowSize\": 123,\n \"earlyStoppingImprovementBar\": 123,\n \"MOMF\": true,\n \"verboseLogging\": true,\n \"disableConstraints\": true,\n \"disableDeduplicate\": true,\n \"maxTotalTrainingTime\": 123,\n \"tunerChildJobMemoryMiB\": 32768,\n \"tunerSpaceOptions\": {},\n \"space\": [\n {\n \"inputBlocks\": [\n {}\n ],\n \"dspBlocks\": [\n {}\n ],\n \"learnBlocks\": [\n [\n {}\n ]\n ],\n \"parameters\": {}\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://studio.edgeimpulse.com/v1/api/{projectId}/optimize/config")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"targetLatency\": 0,\n \"targetDevice\": {\n \"name\": \"cortex-m4f-80mhz\",\n \"ram\": 1024,\n \"rom\": 1024\n },\n \"name\": \"<string>\",\n \"compiler\": [\n \"<string>\"\n ],\n \"precision\": [\n \"<string>\"\n ],\n \"trainingCycles\": 5,\n \"tuningMaxTrials\": 2,\n \"tuningWorkers\": 1,\n \"initialTrials\": 5,\n \"optimizationRounds\": 3,\n \"trialsPerOptimizationRound\": 3,\n \"minMACCS\": 123,\n \"maxMACCS\": 123,\n \"notificationOnCompletion\": true,\n \"importProjectMetrics\": true,\n \"importResourceMetrics\": true,\n \"numImportProjectMetrics\": 123,\n \"numImportResourceMetrics\": 123,\n \"enableSEM\": true,\n \"accuracySEM\": 123,\n \"latencySEM\": 123,\n \"optimizationObjectives\": [\n {\n \"objective\": \"<string>\",\n \"label\": \"<string>\",\n \"weight\": 123\n }\n ],\n \"rawObjectives\": \"<string>\",\n \"earlyStopping\": true,\n \"earlyStoppingWindowSize\": 123,\n \"earlyStoppingImprovementBar\": 123,\n \"MOMF\": true,\n \"verboseLogging\": true,\n \"disableConstraints\": true,\n \"disableDeduplicate\": true,\n \"maxTotalTrainingTime\": 123,\n \"tunerChildJobMemoryMiB\": 32768,\n \"tunerSpaceOptions\": {},\n \"space\": [\n {\n \"inputBlocks\": [\n {}\n ],\n \"dspBlocks\": [\n {}\n ],\n \"learnBlocks\": [\n [\n {}\n ]\n ],\n \"parameters\": {}\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://studio.edgeimpulse.com/v1/api/{projectId}/optimize/config")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"targetLatency\": 0,\n \"targetDevice\": {\n \"name\": \"cortex-m4f-80mhz\",\n \"ram\": 1024,\n \"rom\": 1024\n },\n \"name\": \"<string>\",\n \"compiler\": [\n \"<string>\"\n ],\n \"precision\": [\n \"<string>\"\n ],\n \"trainingCycles\": 5,\n \"tuningMaxTrials\": 2,\n \"tuningWorkers\": 1,\n \"initialTrials\": 5,\n \"optimizationRounds\": 3,\n \"trialsPerOptimizationRound\": 3,\n \"minMACCS\": 123,\n \"maxMACCS\": 123,\n \"notificationOnCompletion\": true,\n \"importProjectMetrics\": true,\n \"importResourceMetrics\": true,\n \"numImportProjectMetrics\": 123,\n \"numImportResourceMetrics\": 123,\n \"enableSEM\": true,\n \"accuracySEM\": 123,\n \"latencySEM\": 123,\n \"optimizationObjectives\": [\n {\n \"objective\": \"<string>\",\n \"label\": \"<string>\",\n \"weight\": 123\n }\n ],\n \"rawObjectives\": \"<string>\",\n \"earlyStopping\": true,\n \"earlyStoppingWindowSize\": 123,\n \"earlyStoppingImprovementBar\": 123,\n \"MOMF\": true,\n \"verboseLogging\": true,\n \"disableConstraints\": true,\n \"disableDeduplicate\": true,\n \"maxTotalTrainingTime\": 123,\n \"tunerChildJobMemoryMiB\": 32768,\n \"tunerSpaceOptions\": {},\n \"space\": [\n {\n \"inputBlocks\": [\n {}\n ],\n \"dspBlocks\": [\n {}\n ],\n \"learnBlocks\": [\n [\n {}\n ]\n ],\n \"parameters\": {}\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"error": "<string>"
}Authorizations
Path Parameters
Project ID
Body
Target latency in MS
0
Target device
Show child attributes
Show child attributes
Maximum number of training cycles
5
Maximum number of trials
2
Maximum number of parallel workers/jobs
1
Number of initial trials
5
Number of optimization rounds
3
Number of trials per optimization round
3
Tuning algorithm to use to search hyperparameter space
random, hyperband, bayesian, custom Whether to import metrics for previous EON tuner runs in the same project to accelerate the hyperparameter search process
Whether to import resource usage (RAM/ROM/latency) metrics to accelerate the hyperparameter search process
Number of project trials to import
Number of resource usage trials to import
Enable standard error of the mean (SEM)
Standard error of the trial accuracy mean
Standard error of the trial latency mean
Hyperparameter optimization objectives and corresponding weights
Show child attributes
Show child attributes
Hyperparameter optimization objectives + weights in string format
Model variant to optimize for
float32, int8 Enable trial level early stopping based on loss metrics during training
Stops the EON tuner if the feasible (mean) objective has not improved over the past “window_size” iterations
Threshold (in [0,1]) for considering relative improvement over the best point.
Enable Multi-fidelity Multi-Objective optimization
Enable verbose logging
Disable search constraints
Disable trial deduplication
Maximum total training time in seconds
Optional memory override for tuner child jobs (MiB), capped at 65536 MiB.
1 <= x <= 65536Show child attributes
Show child attributes
List of impulses specifying the EON Tuner search space
Show child attributes
Show child attributes
Search space template
Show child attributes
Show child attributes
Search space source
Show child attributes
Show child attributes
Was this page helpful?