mirror of
https://github.com/baketnk/frame-yap.git
synced 2026-10-06 03:00:04 +02:00
Allow configured local inference in native-only installs
This commit is contained in:
1 parent
1ba0f26e0e
commit
a19d95a353
8 files changed
+129
-26
No files matched your search
@@ -63,6 +63,17 @@ int main(int argc, char** argv) {
|
||||
return failed;
|
||||
});
|
||||
assert(!worker.ready());
|
||||
for (const auto& [mode, message] : std::vector<std::pair<const char*, const char*>>{
|
||||
{"missing-model", "check --model"}, {"missing-import", "check --python"}}) {
|
||||
worker.start(argv[1], argv[2], mode, 2);
|
||||
failed = false;
|
||||
until([&] {
|
||||
try { worker.poll(); }
|
||||
catch (const std::runtime_error& e) { failed = std::string(e.what()).find(message) != std::string::npos; }
|
||||
return failed;
|
||||
});
|
||||
assert(!worker.ready());
|
||||
}
|
||||
worker.start(argv[1], argv[2], "stale", 2);
|
||||
until([&] { worker.poll(); return worker.ready(); });
|
||||
worker.submit(4, clip);
|
||||
|
||||
Reference in new issue
Block a user