Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dynamo
Commits
3ac95a90
"launch/dynamo-run/src/input/common.rs" did not exist on "110f3f8caeff051b32f168c44fda9faa0d71ed18"
Commit
3ac95a90
authored
Mar 19, 2025
by
Graham King
Committed by
GitHub
Mar 19, 2025
Browse files
fix(dynamo-run): Fix build if llamacpp and mistralrs are disabled (#262)
parent
ba33b2bd
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
9 additions
and
7 deletions
+9
-7
launch/dynamo-run/src/main.rs
launch/dynamo-run/src/main.rs
+1
-1
lib/llm/src/engines.rs
lib/llm/src/engines.rs
+4
-2
lib/llm/src/engines/sglang/subprocess.rs
lib/llm/src/engines/sglang/subprocess.rs
+1
-1
lib/llm/src/engines/sglang/worker.rs
lib/llm/src/engines/sglang/worker.rs
+1
-1
lib/llm/src/engines/vllm/subprocess.rs
lib/llm/src/engines/vllm/subprocess.rs
+1
-1
lib/llm/src/engines/vllm/worker.rs
lib/llm/src/engines/vllm/worker.rs
+1
-1
No files found.
launch/dynamo-run/src/main.rs
View file @
3ac95a90
...
...
@@ -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
)
{}
lib/llm/src/engines.rs
View file @
3ac95a90
...
...
@@ -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
(())
}
lib/llm/src/engines/sglang/subprocess.rs
View file @
3ac95a90
...
...
@@ -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| {
...
...
lib/llm/src/engines/sglang/worker.rs
View file @
3ac95a90
...
...
@@ -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
{
...
...
lib/llm/src/engines/vllm/subprocess.rs
View file @
3ac95a90
...
...
@@ -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();
...
...
lib/llm/src/engines/vllm/worker.rs
View file @
3ac95a90
...
...
@@ -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
());
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment