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
c06b95ff
Commit
c06b95ff
authored
Feb 25, 2025
by
Ryan McCormick
Committed by
GitHub
Feb 25, 2025
Browse files
ci: Add rust checks to missing directories (#239)
Signed-off-by:
Ryan McCormick
<
rmccormick@nvidia.com
>
parent
5f1af25a
Changes
23
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
14 deletions
+10
-14
lib/llm/tests/model_card.rs
lib/llm/tests/model_card.rs
+3
-2
lib/llm/tests/preprocessor.rs
lib/llm/tests/preprocessor.rs
+5
-6
lib/llm/tests/tokenizers.rs
lib/llm/tests/tokenizers.rs
+2
-6
No files found.
lib/llm/tests/model_card.rs
View file @
c06b95ff
...
...
@@ -14,7 +14,9 @@
// limitations under the License.
use
tempfile
::
tempdir
;
use
triton_distributed_llm
::
model_card
::
model
::{
ModelDeploymentCard
,
PromptFormatterArtifact
,
TokenizerKind
};
use
triton_distributed_llm
::
model_card
::
model
::{
ModelDeploymentCard
,
PromptFormatterArtifact
,
TokenizerKind
,
};
const
HF_PATH
:
&
str
=
"tests/data/sample-models/TinyLlama_v1.1"
;
...
...
@@ -46,7 +48,6 @@ async fn test_tokenizer_from_hf_like_local_repo() {
// Verify tokenizer file was found
match
mdc
.tokenizer
{
TokenizerKind
::
HfTokenizerJson
(
_
)
=>
(),
_
=>
panic!
(
"Expected HfTokenizerJson"
),
}
}
...
...
lib/llm/tests/preprocessor.rs
View file @
c06b95ff
...
...
@@ -16,9 +16,9 @@
use
anyhow
::
Ok
;
use
serde
::{
Deserialize
,
Serialize
};
use
triton_llm
::
model_card
::
model
::{
ModelDeploymentCard
,
PromptContextMixin
};
use
triton_llm
::
preprocessor
::
prompt
::
PromptFormatter
;
use
triton_llm
::
protocols
::
openai
::
chat_completions
::{
use
triton_
distributed_
llm
::
model_card
::
model
::{
ModelDeploymentCard
,
PromptContextMixin
};
use
triton_
distributed_
llm
::
preprocessor
::
prompt
::
PromptFormatter
;
use
triton_
distributed_
llm
::
protocols
::
openai
::
chat_completions
::{
ChatCompletionMessage
,
ChatCompletionRequest
,
Tool
,
ToolChoiceType
,
};
...
...
@@ -33,10 +33,9 @@ use std::path::PathBuf;
/// set in the environment variable `HF_TOKEN`.
/// The model is downloaded and cached in `tests/data/sample-models` directory.
/// make sure the token has access to `meta-llama/Llama-3.1-70B-Instruct` model
fn
check_hf_token
()
->
bool
{
let
hf_token
=
std
::
env
::
var
(
"HF_TOKEN"
)
.ok
();
return
hf_token
.is_some
()
;
hf_token
.is_some
()
}
async
fn
make_mdc_from_repo
(
...
...
@@ -71,7 +70,7 @@ async fn maybe_download_model(local_path: &str, model: &str, revision: &str) ->
for
file
in
&
files_to_download
{
downloaded_path
=
repo_builder
.get
(
file
)
.await
.unwrap
();
}
return
downloaded_path
.parent
()
.unwrap
()
.display
()
.to_string
()
;
downloaded_path
.parent
()
.unwrap
()
.display
()
.to_string
()
}
async
fn
make_mdcs
()
->
Vec
<
ModelDeploymentCard
>
{
...
...
lib/llm/tests/tokenizers.rs
View file @
c06b95ff
...
...
@@ -27,12 +27,8 @@
use
std
::
collections
::
HashMap
;
use
std
::
sync
::
Arc
;
use
triton_llm
::
protocols
::
TokenIdType
;
use
triton_llm
::
tokenizers
::
*
;
use
triton_llm
::
tokenizers
::{
traits
::{
Decoder
,
Encoder
,
Tokenizer
},
Encoding
,
Error
,
Result
,
};
use
triton_distributed_llm
::
tokenizers
::
traits
::{
Decoder
,
Encoder
};
use
triton_distributed_llm
::
tokenizers
::
*
;
const
TEST_PROMPTS
:
[
&
str
;
4
]
=
[
"deep learning is"
,
...
...
Prev
1
2
Next
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