Skip to content

Commit 7b0b6c0

Browse files
committed
review
1 parent 8038ffe commit 7b0b6c0

5 files changed

Lines changed: 4 additions & 18 deletions

File tree

‎packages/react-native-executorch/common/rnexecutorch/host_objects/JsiConversions.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,8 +235,8 @@ getValue<std::vector<std::vector<float>>>(const jsi::Value &val,
235235
std::vector<std::vector<float>> result;
236236
result.reserve(length);
237237
for (size_t i = 0; i < length; ++i) {
238-
auto span =
239-
getTypedArrayAsSpan<float>(array.getValueAtIndex(runtime, i), runtime);
238+
jsi::Value element = array.getValueAtIndex(runtime, i);
239+
auto span = getTypedArrayAsSpan<float>(element, runtime);
240240
result.emplace_back(span.begin(), span.end());
241241
}
242242
return result;

‎packages/react-native-executorch/common/rnexecutorch/host_objects/ModelHostObject.h‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -284,11 +284,9 @@ template <typename Model> class ModelHostObject : public JsiHostObject {
284284
return jsi_conversion::getJsiValue(std::move(result), runtime);
285285
}
286286
} catch (const RnExecutorchError &e) {
287-
rnexecutorch::log(rnexecutorch::LOG_LEVEL::Info, "kappa", e.what());
288287
throw jsi::JSError(runtime, makeRnExecutorchErrorValue(
289288
runtime, e.getNumericCode(), e.what()));
290289
} catch (const std::exception &e) {
291-
rnexecutorch::log(rnexecutorch::LOG_LEVEL::Info, "kappa", e.what());
292290
throw jsi::JSError(runtime, e.what());
293291
} catch (...) {
294292
throw jsi::JSError(runtime, "Unknown error in synchronous function");
@@ -353,11 +351,9 @@ template <typename Model> class ModelHostObject : public JsiHostObject {
353351
return jsi_conversion::getJsiValue(std::move(result), runtime);
354352
}
355353
} catch (const RnExecutorchError &e) {
356-
rnexecutorch::log(rnexecutorch::LOG_LEVEL::Info, "kappa", e.what());
357354
throw jsi::JSError(runtime, makeRnExecutorchErrorValue(
358355
runtime, e.getNumericCode(), e.what()));
359356
} catch (const std::exception &e) {
360-
rnexecutorch::log(rnexecutorch::LOG_LEVEL::Info, "kappa", e.what());
361357
throw jsi::JSError(runtime, e.what());
362358
} catch (...) {
363359
throw jsi::JSError(runtime, "Unknown error in vision function");
@@ -418,8 +414,6 @@ template <typename Model> class ModelHostObject : public JsiHostObject {
418414
});
419415
}
420416
} catch (const RnExecutorchError &e) {
421-
rnexecutorch::log(rnexecutorch::LOG_LEVEL::Info, "kappa",
422-
e.what());
423417
auto code = e.getNumericCode();
424418
auto msg = std::string(e.what());
425419
callInvoker->invokeAsync(
@@ -429,8 +423,6 @@ template <typename Model> class ModelHostObject : public JsiHostObject {
429423
});
430424
return;
431425
} catch (const std::exception &e) {
432-
rnexecutorch::log(rnexecutorch::LOG_LEVEL::Info, "kappa",
433-
e.what());
434426
callInvoker->invokeAsync([e = std::move(e), promise]() {
435427
promise->reject(std::string(e.what()));
436428
});

‎packages/react-native-executorch/common/runner/multimodal_prefiller.cpp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,9 @@ auto MultimodalPrefiller::processMultimodalInput(
109109
for (auto t : tokens) {
110110
ids.push_back(static_cast<int64_t>(t));
111111
}
112-
ET_LOG(Error, "Unsupported MultimodalInput type");
113-
return Error::NotSupported;
114112
}
113+
ET_LOG(Error, "Unsupported MultimodalInput type");
114+
return Error::NotSupported;
115115
}
116116

117117
auto MultimodalPrefiller::encodeAudio(

‎packages/react-native-executorch/common/runner/text_prefiller.cpp‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
// LLM.
1111

1212
#include "text_prefiller.h"
13-
#include "rnexecutorch/Log.h"
1413
#include <algorithm>
1514

1615
namespace executorch {

‎packages/react-native-executorch/src/hooks/natural_language_processing/useLLM.ts‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,6 @@ export function useLLM({
5959
try {
6060
await controllerInstance.load({
6161
model: model,
62-
// modelSource: model.modelSource,
63-
// tokenizerSource: model.tokenizerSource,
64-
// tokenizerConfigSource: model.tokenizerConfigSource!,
65-
// capabilities: model.capabilities,
66-
// defaultGenerationConfig: model.generationConfig,
6762
onDownloadProgressCallback: setDownloadProgress,
6863
});
6964
} catch (e) {

0 commit comments

Comments
 (0)