"...multi-trial/git@developer.sourcefind.cn:OpenDAS/nni.git" did not exist on "a911b856172741802083ab1ce2f92f09e9ec279f"
Unverified Commit fc8eda36 authored by Sai-Suraj-27's avatar Sai-Suraj-27 Committed by GitHub
Browse files

fix: Fixed `type annotation` for compatability with python 3.8 (#30243)

* Fixed type annotation for compatability with python 3.8

* Fixed unsorted imports.
parent b6b6daf2
...@@ -21,7 +21,7 @@ import os ...@@ -21,7 +21,7 @@ import os
import tempfile import tempfile
import urllib import urllib
import warnings import warnings
from typing import Any, Optional, Tuple from typing import Any, List, Optional, Tuple
import torch import torch
from huggingface_hub.utils import insecure_hashlib from huggingface_hub.utils import insecure_hashlib
...@@ -252,7 +252,7 @@ def convert_openai_whisper_to_tfms( ...@@ -252,7 +252,7 @@ def convert_openai_whisper_to_tfms(
# Adapted from https://github.com/openai/tiktoken/issues/60#issuecomment-1499977960 # Adapted from https://github.com/openai/tiktoken/issues/60#issuecomment-1499977960
def _bpe(mergeable_ranks, token: bytes, max_rank=None) -> list[bytes]: def _bpe(mergeable_ranks, token: bytes, max_rank=None) -> List[bytes]:
parts = [bytes([b]) for b in token] parts = [bytes([b]) for b in token]
while True: while True:
min_idx = None min_idx = None
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment