Skip to content

Commit

Permalink
updated all documentation and scripts to reflect the reorganization o…
Browse files Browse the repository at this point in the history
…… (#71)

* updated all documentation and scripts to reflect the reorganization of the repo
* Updated ReadMe with proper paths
* updated many areas of the readme to correct typos and to extend several example fields to extend under evaluators.
* Updated the mobiledetedgetpu directory to be all lowercase. Corrected several typos in import fields

Signed-off-by: Bharath Ramaswamy <quic_bharathr@quicinc.com>
  • Loading branch information
quic-bharathr committed Dec 21, 2022
1 parent c008fc0 commit f74d559
Show file tree
Hide file tree
Showing 123 changed files with 91 additions and 91 deletions.
136 changes: 68 additions & 68 deletions README.md

Large diffs are not rendered by default.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
OFFICIAL_URL_HEAD="https://github.com/quic/aimet-model-zoo/releases/download/torch_dlv3_w8a8_pc/deeplabv3+w8a8_tfe_perchannel.pth" # To be replaced

# Utils imports
from utils.utils_qa_dataclass import ModelArguments, DataTrainingArguments, AuxArguments
from zoo_torch.bert.utils.utils_qa_dataclass import ModelArguments, DataTrainingArguments, AuxArguments

os.environ['WANDB_DISABLED']="true"

Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
from torch.nn import BCEWithLogitsLoss, CrossEntropyLoss, MSELoss

from aimet_torch import elementwise_ops
from utils.activations import get_activation
from zoo_torch.bert.utils.activations import get_activation

from transformers.file_utils import (
ModelOutput,
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@

#AIMET torch related imports
from aimet_torch.quantsim import QuantizationSimModel
from zoo_torch.examples.common.image_net_data_loader import ImageNetDataLoader
from aimet_model_zoo.zoo_torch.common.utils import get_device
from zoo_torch.common.utils.image_net_data_loader import ImageNetDataLoader
from zoo_torch.common.utils.utils import get_device


QUANTSIM_CONFIG_URL = "https://raw.githubusercontent.com/quic/aimet/release-aimet-1.22.1/TrainingExtensions/common/src/python/aimet_common/quantsim_config/default_config_per_channel.json"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from utils.metrics import Evaluator
from dataloaders import make_data_loader
from modeling.deeplab import DeepLab
from zoo_torch.examples.common.utils import get_device
from zoo_torch.common.utils.utils import get_device

# Torch related imports
import torch
Expand Down Expand Up @@ -183,4 +183,4 @@ def main():

if __name__ == '__main__':
download_weights()
main()
main()
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export PYTHONPATH=$PYTHONPATH:<path to parent>/aimet-model-zoo
```

- Install requirements :
`pip install -r aimet-model-zoo/zoo_torch/examples/deepspeech2/requirements.txt`
`pip install -r aimet-model-zoo/zoo_torch/deepspeech2/evaluators/requirements.txt`

## Obtain the Test Dataset

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
from aimet_common.defs import QuantScheme
from aimet_torch.quantsim import QuantizationSimModel

from zoo_torch.examples.common.utils import get_device
from zoo_torch.common.utils.utils import get_device

def run_quantsim_evaluation(args):
device = get_device(args)
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
from torch.nn import CrossEntropyLoss

from aimet_torch import elementwise_ops
from utils.activations import get_activation
from zoo_torch.distilbert.evaluators.utils.activations import get_activation

from transformers.file_utils import (
add_code_sample_docstrings,
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
from aimet_torch.quantsim import QuantizationSimModel

# aimet model zoo imports
from zoo_torch.examples.common import utils
from zoo_torch.examples.common.image_net_data_loader import ImageNetDataLoader
from zoo_torch.common.utils import utils
from zoo_torch.common.utils.image_net_data_loader import ImageNetDataLoader

# ImageNet data loader
def get_imagenet_dataloader(image_dir, BATCH_SIZE=64):
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import urllib.request
from tqdm import tqdm
from functools import partial
from zoo_torch.examples.common.utils import get_device
from zoo_torch.common.utils.utils import get_device

# Torch related imports
import torch
Expand Down Expand Up @@ -200,4 +200,4 @@ def main(args):
if __name__ == '__main__':
args = arguments()
download_weights(args)
main(args)
main(args)
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ sudo -H apt-get update
sudo -H apt-get install ffmpeg
sudo -H chmod 777 -R <path_to_python_package>/dist-packages/*

cd <path_to_aimet_modelzoo>/zoo_torch/examples
cd <path_to_aimet_modelzoo>/zoo_torch
git clone https://github.com/HRNet/HRNet-Human-Pose-Estimation.git
cd HRNet-Human-Pose-Estimation/
git checkout 00d7bf72f56382165e504b10ff0dddb82dca6fd2
cp -r ./lib/ ../hrnet-posenet/

cd zoo_torch/examples/hrnet-posenet/lib
cd zoo_torch/hrnet-posenet/lib
make
```

Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
from aimet_torch.quantsim import QuantizationSimModel

# AIMET model zoo imports
from zoo_torch.examples.common import utils
from zoo_torch.common.utils import utils


# Get evaluation func to evaluate the model
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
from torch.nn import BCEWithLogitsLoss, CrossEntropyLoss, MSELoss

from aimet_torch import elementwise_ops
from utils.activations import get_activation
from zoo_torch.minilm.evaluators.utils.activations import get_activation

from transformers.file_utils import (
ModelOutput,
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@

#from ...activations import ACT2FN
#from aimet_torch.transformers import activations
from utils import activations
from zoo_torch.mobilebert.evaluators.utils import activations
from aimet_torch import elementwise_ops

from transformers.file_utils import (
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
from aimet_torch.utils import is_leaf_module
from aimet_torch.qc_quantize_op import QcQuantizeStandAloneBase, QcQuantizeWrapper, StaticGridQuantWrapper

from zoo_torch.examples.common.utils import get_device
from zoo_torch.common.utils.utils import get_device


def work_init(work_id):
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
from aimet_common.defs import QuantScheme

# aimet model zoo import
from zoo_torch.examples.common import utils
from zoo_torch.common.utils import utils


def get_pre_stage_net():
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
from torch.nn import BCEWithLogitsLoss, CrossEntropyLoss, MSELoss

from aimet_torch import elementwise_ops
from utils.activations import get_activation
from zoo_torch.roberta.evaluators.utils.activations import get_activation

from transformers.file_utils import (
add_code_sample_docstrings,
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
from aimet_torch import quantsim

# import common util in AIMET examples folder
from zoo_torch.examples.common import utils
from zoo_torch.common.utils import utils


def evaluate_generator(generator,
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
from aimet_torch.quantsim import QuantizationSimModel

# AIMET model zoo imports
from zoo_torch.examples.common.utils import get_device
from zoo_torch.common.utils.utils import get_device

def download_weights():
# Download labels
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit f74d559

Please sign in to comment.