Skip to content

Commit

Permalink
added timm tests (tiny vit)
Browse files Browse the repository at this point in the history
  • Loading branch information
IlyasMoutawwakil committed Jan 13, 2024
1 parent e8b4e2b commit 4022aca
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 21 deletions.
6 changes: 6 additions & 0 deletions tests/configs/_diffusers_.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
model: hf-internal-testing/tiny-stable-diffusion-torch
task: stable-diffusion

benchmark:
forward_kwargs:
num_inference_steps: 2
2 changes: 2 additions & 0 deletions tests/configs/_timm_.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
model: timm/tiny_vit_21m_224.in1k
task: image_classification
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,8 @@ defaults:
# order of inheritance, last one overrides previous ones
- _base_ # inherits from base config
- _inference_ # inherits from inference config
- _diffusers_ # inherits from diffusers config
- _self_ # for hydra 1.1 compatibility

experiment_name: cpu_inference_onnxruntime_diffusion
model: hf-internal-testing/tiny-stable-diffusion-torch
task: stable-diffusion
experiment_name: cpu_inference_onnxruntime_diffusers
device: cpu

benchmark:
forward_kwargs:
num_inference_steps: 2
10 changes: 10 additions & 0 deletions tests/configs/cpu_inference_onnxruntime_timm.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
defaults:
- backend: onnxruntime
# order of inheritance, last one overrides previous ones
- _base_ # inherits from base config
- _inference_ # inherits from inference config
- _timm_ # inherits from timm config
- _self_ # for hydra 1.1 compatibility

experiment_name: cpu_inference_onnxruntime_timm
device: cpu
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,8 @@ defaults:
# order of inheritance, last one overrides previous ones
- _base_ # inherits from base config
- _inference_ # inherits from inference config
- _diffusers_ # inherits from diffusers config
- _self_ # for hydra 1.1 compatibility

experiment_name: cpu_inference_openvino_diffusion
model: hf-internal-testing/tiny-stable-diffusion-torch
task: stable-diffusion
experiment_name: cpu_inference_openvino_diffusers
device: cpu

benchmark:
forward_kwargs:
num_inference_steps: 2
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,8 @@ defaults:
# order of inheritance, last one overrides previous ones
- _base_ # inherits from base config
- _inference_ # inherits from inference config
- _diffusers_ # inherits from diffusers config
- _self_ # for hydra 1.1 compatibility

experiment_name: cpu_inference_pytorch_diffusion
model: hf-internal-testing/tiny-stable-diffusion-torch
task: stable-diffusion
experiment_name: cpu_inference_pytorch_diffusers
device: cpu

benchmark:
forward_kwargs:
num_inference_steps: 2
10 changes: 10 additions & 0 deletions tests/configs/cpu_inference_pytorch_timm.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
defaults:
- backend: pytorch
# order of inheritance, last one overrides previous ones
- _base_ # inherits from base config
- _inference_ # inherits from inference config
- _timm_ # inherits from timm config
- _self_ # for hydra 1.1 compatibility

experiment_name: cpu_inference_pytorch_timm
device: cpu

0 comments on commit 4022aca

Please sign in to comment.