File tree Expand file tree Collapse file tree 2 files changed +2
-6
lines changed
templates/src/test_built_ins Expand file tree Collapse file tree 2 files changed +2
-6
lines changed Original file line number Diff line number Diff line change 4
4
///
5
5
/// TODO: Remove this file when a new release of Candle makes it obsolete.
6
6
use anyhow:: { bail, Result } ;
7
- use candle:: { DType , Device , Tensor } ;
7
+ use candle:: { DType , Tensor } ;
8
8
use candle_nn:: { Embedding , VarBuilder } ;
9
9
use serde:: Deserialize ;
10
10
@@ -503,10 +503,9 @@ impl BertEncoder {
503
503
}
504
504
505
505
// https://github.com/huggingface/transformers/blob/6eedfa6dd15dc1e22a55ae036f681914e5a0d9a1/src/transformers/models/bert/modeling_bert.py#L874
506
- pub struct BertModel {
506
+ pub ( crate ) struct BertModel {
507
507
embeddings : BertEmbeddings ,
508
508
encoder : BertEncoder ,
509
- pub device : Device ,
510
509
span : tracing:: Span ,
511
510
}
512
511
@@ -535,7 +534,6 @@ impl BertModel {
535
534
Ok ( Self {
536
535
embeddings,
537
536
encoder,
538
- device : vb. device ( ) . clone ( ) ,
539
537
span : tracing:: span!( tracing:: Level :: TRACE , "model" ) ,
540
538
} )
541
539
}
Original file line number Diff line number Diff line change 1
- #![ cfg( test) ]
2
-
3
1
// Module for unit-testing the built-in templates when a full integration test would be overkill.
4
2
// If your test involves invoking the Spin CLI, or builds or runs an application, use
5
3
// an integration test.
You can’t perform that action at this time.
0 commit comments