Skip to content

Commit d827f00

Browse files
committed
fix nimparser unittests
Signed-off-by: Varun Ramachandra Sekar <vsekar@nvidia.com>
1 parent be89b19 commit d827f00

7 files changed

Lines changed: 48 additions & 17 deletions

File tree

internal/nimparser/testdata/manifest_vllm.yaml

Lines changed: 0 additions & 10 deletions
This file was deleted.

internal/nimparser/nimparser_suite_test.go renamed to internal/nimparser/v1/nimparser_suite_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17-
package nimparser_test
17+
package v1_test
1818

1919
import (
2020
"testing"
@@ -23,7 +23,7 @@ import (
2323
. "github.com/onsi/gomega"
2424
)
2525

26-
func TestRender(t *testing.T) {
26+
func TestNIMParser(t *testing.T) {
2727
RegisterFailHandler(Fail)
2828
RunSpecs(t, "Model Manifest Parser Test Suite")
2929
}

internal/nimparser/v1/nimparser_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ var _ = Describe("NIMParser", func() {
3232
Context("ParseModelManifest", func() {
3333
It("should parse a model profile for trtllm engine files correctly", func() {
3434

35-
filePath := filepath.Join("testdata", "manifest_trtllm.yaml")
35+
filePath := filepath.Join("testdata", "manifest_trtllm_v1.yaml")
3636
nimparser := NIMParser{}
3737
config, err := nimparser.ParseModelManifest(filePath)
3838
Expect(err).NotTo(HaveOccurred())
@@ -49,7 +49,7 @@ var _ = Describe("NIMParser", func() {
4949
})
5050
It("should parse a model profile for vllm engine files correctly", func() {
5151

52-
filePath := filepath.Join("testdata", "manifest_vllm.yaml")
52+
filePath := filepath.Join("testdata", "manifest_vllm_v1.yaml")
5353
nimparser := NIMParser{}
5454
config, err := nimparser.ParseModelManifest(filePath)
5555
Expect(err).NotTo(HaveOccurred())
@@ -83,7 +83,7 @@ var _ = Describe("NIMParser", func() {
8383
Expect(profile.ContainerURL).To(Equal("nvcr.io/nim/meta/llama3-70b-instruct:1.0.0"))
8484
})
8585
It("should match model profiles with valid parameters", func() {
86-
filePath := filepath.Join("testdata", "manifest_trtllm.yaml")
86+
filePath := filepath.Join("testdata", "manifest_trtllm_v1.yaml")
8787
nimparser := NIMParser{}
8888
config, err := nimparser.ParseModelManifest(filePath)
8989
Expect(err).NotTo(HaveOccurred())
@@ -112,7 +112,7 @@ var _ = Describe("NIMParser", func() {
112112
Expect(matchedProfiles).To(HaveLen(1))
113113
})
114114
It("should not match model profiles with invalid parameters", func() {
115-
filePath := filepath.Join("testdata", "manifest_trtllm.yaml")
115+
filePath := filepath.Join("testdata", "manifest_trtllm_v1.yaml")
116116
nimparser := NIMParser{}
117117
config, err := nimparser.ParseModelManifest(filePath)
118118
Expect(err).NotTo(HaveOccurred())
@@ -133,7 +133,7 @@ var _ = Describe("NIMParser", func() {
133133
Expect(matchedProfiles).To(BeEmpty())
134134
})
135135
It("should match model profiles using automatically discovered GPUs", func() {
136-
filePath := filepath.Join("testdata", "manifest_trtllm.yaml")
136+
filePath := filepath.Join("testdata", "manifest_trtllm_v1.yaml")
137137
nimparser := NIMParser{}
138138
config, err := nimparser.ParseModelManifest(filePath)
139139
Expect(err).NotTo(HaveOccurred())
File renamed without changes.
File renamed without changes.

internal/nimparser/testdata/manifest_trtllm.yaml renamed to internal/nimparser/v1/testdata/manifest_trtllm_v1.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,15 @@
1111
profile: throughput
1212
tp: '8'
1313
container_url: nvcr.io/nim/meta/llama3-70b-instruct:1.0.0
14+
workspace: !workspace
15+
components:
16+
- dst: trtllm_engine
17+
src:
18+
files:
19+
- !name 'LICENSE.txt'
20+
- !name 'NOTICE.txt'
21+
- !name 'checksums.blake3'
22+
- !name 'config.json'
23+
- !name 'metadata.json'
24+
- !name 'rank0.engine'
25+
- !name 'rank1.engine'
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
0f3de1afe11d355e01657424a267fbaad19bfea3143a9879307c49aed8299db0:
2+
model: meta/llama3-70b-instruct
3+
release: '1.0.0'
4+
tags:
5+
feat_lora: 'true'
6+
feat_lora_max_rank: '32'
7+
llm_engine: vllm
8+
precision: fp16
9+
tp: '8'
10+
container_url: nvcr.io/nim/meta/llama3-70b-instruct:1.0.0
11+
workspace: !workspace
12+
components:
13+
- dst: ''
14+
src:
15+
files:
16+
- !name 'README.md'
17+
- !name 'checksums.blake3'
18+
- !name 'config.json'
19+
- !name 'generation_config.json'
20+
- !name 'merges.txt'
21+
- !name 'model-00001-of-00001.safetensors'
22+
- !name 'model.safetensors.index.json'
23+
- !name 'params.json'
24+
- !name 'special_tokens_map.json'
25+
- !name 'tekken.json'
26+
- !name 'tokenizer.json'
27+
- !name 'tokenizer_config.json'
28+
- !name 'vocab.json'
29+
repo_id: 'ngc://nim/meta/llama3-70b-instruct:1.0.0'

0 commit comments

Comments
 (0)