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
text-generation-inference
Commits
a2a97b05
Unverified
Commit
a2a97b05
authored
Jun 25, 2024
by
Nicolas Patry
Committed by
GitHub
Jun 25, 2024
Browse files
Fix CI . (#2118)
Fix clippy.
parent
fc9c3153
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
5 deletions
+8
-5
README.md
README.md
+1
-1
benchmark/src/main.rs
benchmark/src/main.rs
+3
-1
launcher/src/main.rs
launcher/src/main.rs
+1
-2
router/src/main.rs
router/src/main.rs
+3
-1
No files found.
README.md
View file @
a2a97b05
benchmark/src/main.rs
View file @
a2a97b05
...
@@ -147,7 +147,9 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
...
@@ -147,7 +147,9 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
tracing
::
info!
(
"Downloading tokenizer"
);
tracing
::
info!
(
"Downloading tokenizer"
);
// Parse Huggingface hub token
// Parse Huggingface hub token
let
auth_token
=
std
::
env
::
var
(
"HF_TOKEN"
)
.or_else
(|
_
|
std
::
env
::
var
(
"HUGGING_FACE_HUB_TOKEN"
))
.ok
();
let
auth_token
=
std
::
env
::
var
(
"HF_TOKEN"
)
.or_else
(|
_
|
std
::
env
::
var
(
"HUGGING_FACE_HUB_TOKEN"
))
.ok
();
// Download and instantiate tokenizer
// Download and instantiate tokenizer
// We need to download it outside of the Tokio runtime
// We need to download it outside of the Tokio runtime
...
...
launcher/src/main.rs
View file @
a2a97b05
...
@@ -762,7 +762,7 @@ fn num_cuda_devices() -> Option<usize> {
...
@@ -762,7 +762,7 @@ fn num_cuda_devices() -> Option<usize> {
Err
(
_
)
=>
match
env
::
var
(
"NVIDIA_VISIBLE_DEVICES"
)
{
Err
(
_
)
=>
match
env
::
var
(
"NVIDIA_VISIBLE_DEVICES"
)
{
Ok
(
devices
)
=>
devices
,
Ok
(
devices
)
=>
devices
,
Err
(
_
)
=>
env
::
var
(
"ZE_AFFINITY_MASK"
)
.ok
()
?
,
Err
(
_
)
=>
env
::
var
(
"ZE_AFFINITY_MASK"
)
.ok
()
?
,
}
}
,
};
};
let
n_devices
=
devices
.split
(
','
)
.count
();
let
n_devices
=
devices
.split
(
','
)
.count
();
Some
(
n_devices
)
Some
(
n_devices
)
...
@@ -1225,7 +1225,6 @@ fn spawn_webserver(
...
@@ -1225,7 +1225,6 @@ fn spawn_webserver(
router_args
.push
(
"--otlp-service-name"
.to_string
());
router_args
.push
(
"--otlp-service-name"
.to_string
());
router_args
.push
(
otlp_service_name
);
router_args
.push
(
otlp_service_name
);
// CORS origins
// CORS origins
for
origin
in
args
.cors_allow_origin
.into_iter
()
{
for
origin
in
args
.cors_allow_origin
.into_iter
()
{
router_args
.push
(
"--cors-allow-origin"
.to_string
());
router_args
.push
(
"--cors-allow-origin"
.to_string
());
...
...
router/src/main.rs
View file @
a2a97b05
...
@@ -159,7 +159,9 @@ async fn main() -> Result<(), RouterError> {
...
@@ -159,7 +159,9 @@ async fn main() -> Result<(), RouterError> {
});
});
// Parse Huggingface hub token
// Parse Huggingface hub token
let
authorization_token
=
std
::
env
::
var
(
"HF_TOKEN"
)
.or_else
(|
_
|
std
::
env
::
var
(
"HUGGING_FACE_HUB_TOKEN"
))
.ok
();
let
authorization_token
=
std
::
env
::
var
(
"HF_TOKEN"
)
.or_else
(|
_
|
std
::
env
::
var
(
"HUGGING_FACE_HUB_TOKEN"
))
.ok
();
// Tokenizer instance
// Tokenizer instance
// This will only be used to validate payloads
// This will only be used to validate payloads
...
...
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