"launch/dynamo-run/src/input/common.rs" did not exist on "110f3f8caeff051b32f168c44fda9faa0d71ed18"
Commit 3ac95a90 authored by Graham King's avatar Graham King Committed by GitHub
Browse files

fix(dynamo-run): Fix build if llamacpp and mistralrs are disabled (#262)

parent ba33b2bd
......@@ -225,4 +225,4 @@ fn print_cuda(output: &Output) {
}
#[cfg(not(any(feature = "mistralrs", feature = "llamacpp")))]
fn print_cuda(_output: Output) {}
fn print_cuda(_output: &Output) {}
......@@ -59,7 +59,7 @@ use pyo3::prelude::*;
target_os = "macos",
any(feature = "sglang", feature = "vllm", feature = "python")
))]
fn fix_venv(venv: String, py: pyo3::Python<'_>) -> anyhow::Result<()> {
fn fix_venv(venv: String, py: Python<'_>) -> anyhow::Result<()> {
let version_info = py.version_info();
let sys: PyObject = py.import("sys")?.into();
let sys_path = sys.getattr(py, "path")?;
......@@ -76,4 +76,6 @@ fn fix_venv(venv: String, py: pyo3::Python<'_>) -> anyhow::Result<()> {
target_os = "linux",
any(feature = "sglang", feature = "vllm", feature = "python")
))]
fn fix_venv(_venv: String, _py: Python<'_>) {}
fn fix_venv(_venv: String, _py: Python<'_>) -> anyhow::Result<()> {
Ok(())
}
......@@ -94,7 +94,7 @@ pub fn run_subprocess(
) -> anyhow::Result<()> {
pyo3::prepare_freethreaded_python(); // or enable feature "auto-initialize"
if let Ok(venv) = env::var("VIRTUAL_ENV") {
Python::with_gil(|py| crate::engines::fix_venv(venv, py));
let _ = Python::with_gil(|py| crate::engines::fix_venv(venv, py));
}
let dir = model_path.display().to_string();
Python::with_gil(|py| {
......
......@@ -291,7 +291,7 @@ pub async fn start(
) -> anyhow::Result<SgLangWorker> {
pyo3::prepare_freethreaded_python();
if let Ok(venv) = env::var("VIRTUAL_ENV") {
Python::with_gil(|py| crate::engines::fix_venv(venv, py));
let _ = Python::with_gil(|py| crate::engines::fix_venv(venv, py));
}
let Sockets {
......
......@@ -58,7 +58,7 @@ pub fn run_subprocess(
) -> anyhow::Result<()> {
pyo3::prepare_freethreaded_python(); // or enable feature "auto-initialize"
if let Ok(venv) = env::var("VIRTUAL_ENV") {
Python::with_gil(|py| crate::engines::fix_venv(venv, py));
let _ = Python::with_gil(|py| crate::engines::fix_venv(venv, py));
}
let card = model_card_path.display().to_string();
let model_path_str = model_path.display().to_string();
......
......@@ -167,7 +167,7 @@ pub async fn start(
) -> anyhow::Result<VllmWorker> {
pyo3::prepare_freethreaded_python(); // or enable feature "auto-initialize"
if let Ok(venv) = env::var("VIRTUAL_ENV") {
Python::with_gil(|py| crate::engines::fix_venv(venv, py));
let _ = Python::with_gil(|py| crate::engines::fix_venv(venv, py));
}
let py_imports = Arc::new(python_imports());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment