| 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, |
nothing calls this directly
no test coverage detected