Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TorchFX] Conformance test init #2841

Conversation

daniil-lyakhov
Copy link
Collaborator

@daniil-lyakhov daniil-lyakhov commented Jul 24, 2024

Changes

Conformance test for resnet18

Reason for changes

To extend testing scope for the TorchFX backend

Related tickets

#2766

Tests

post_training_quantization/442 is successfull

@github-actions github-actions bot added NNCF PT Pull requests that updates NNCF PyTorch NNCF Common Pull request that updates NNCF Common experimental NNCF PTQ Pull requests that updates NNCF PTQ labels Jul 24, 2024
@daniil-lyakhov daniil-lyakhov changed the title [TorchFX] Conformance test inint [TorchFX] Conformance test init Jul 24, 2024
@daniil-lyakhov daniil-lyakhov force-pushed the dl/torch_fx/conformance branch 3 times, most recently from 5daacf3 to 237771d Compare July 26, 2024 09:10
@github-actions github-actions bot removed NNCF Common Pull request that updates NNCF Common experimental labels Jul 26, 2024
@daniil-lyakhov daniil-lyakhov force-pushed the dl/torch_fx/conformance branch from 02024fd to 9c8daec Compare July 29, 2024 16:04
@github-actions github-actions bot removed the NNCF PT Pull requests that updates NNCF PyTorch label Jul 29, 2024
@daniil-lyakhov daniil-lyakhov force-pushed the dl/torch_fx/conformance branch 2 times, most recently from 044021d to 31146c3 Compare August 6, 2024 11:58
@daniil-lyakhov daniil-lyakhov marked this pull request as ready for review August 6, 2024 12:53
@daniil-lyakhov daniil-lyakhov requested a review from a team as a code owner August 6, 2024 12:53
tests/post_training/test_quantize_conformance.py Outdated Show resolved Hide resolved
@@ -22,6 +22,16 @@ hf/hf-internal-testing/tiny-random-gpt2_backend_OV:
metric_value: null
hf/hf-internal-testing/tiny-random-gpt2_backend_TORCH:
metric_value: null
torchvision/resnet18_backend_FP32:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What differ between torchvision and timm models?
If it's same but timm can not be exported to FX, timm/resnet18 can be removed

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've removed timm/resnet18 and replaced with torchvision/resnet18

tests/post_training/pipelines/base.py Show resolved Hide resolved
self.calibration_dataset = nncf.Dataset(loader, self.get_transform_calibration_fn())

def _validate(self):
val_dataset = datasets.ImageFolder(root=self.data_dir / "imagenet" / "val", transform=self.transform)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like it can be reused from image_classification_timm.py

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@daniil-lyakhov daniil-lyakhov force-pushed the dl/torch_fx/conformance branch 2 times, most recently from e87712a to 1700e7f Compare August 7, 2024 09:49
@daniil-lyakhov
Copy link
Collaborator Author

Build post_training_quantization/442 is green

@AlexanderDokuchaev AlexanderDokuchaev merged commit eb91af2 into openvinotoolkit:develop Aug 7, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NNCF PTQ Pull requests that updates NNCF PTQ
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants