MCPcopy Create free account
hub / github.com/MrNeRF/LichtFeld-Studio / uninstall_async

Method uninstall_async

src/python/package_manager.cpp:526–547  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

524 }
525
526 bool PackageManager::uninstall_async(const std::string& package,
527 UvRunner::OutputCallback on_output,
528 UvRunner::CompletionCallback on_complete) {
529 if (!ensure_venv())
530 return false;
531
532 if (!m_runner) {
533 m_runner = std::make_unique<UvRunner>();
534 }
535
536 if (m_runner->is_running()) {
537 LOG_ERROR("Another UV operation is already running");
538 return false;
539 }
540
541 LOG_INFO("Uninstalling {} (async)", package);
542
543 m_runner->set_output_callback(std::move(on_output));
544 m_runner->set_completion_callback(std::move(on_complete));
545
546 return m_runner->start({"pip", "uninstall", package, "-y", "--python", lfs::core::path_to_utf8(venv_python())});
547 }
548
549 bool PackageManager::install_torch_async(const std::string& cuda_version,
550 const std::string& torch_version,

Callers

nothing calls this directly

Calls 6

moveFunction · 0.85
path_to_utf8Function · 0.85
set_output_callbackMethod · 0.80
is_runningMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected