diff --git a/modelscope/fileio/file.py b/modelscope/fileio/file.py index 3fff80c8..93329d2e 100644 --- a/modelscope/fileio/file.py +++ b/modelscope/fileio/file.py @@ -138,7 +138,7 @@ class HTTPStorage(Storage): self, filepath: str) -> Generator[Union[str, Path], None, None]: """Download a file from ``filepath``. - ``as_local_path`` is decorated by :meth:`contxtlib.contextmanager`. It + ``as_local_path`` is decorated by :meth:`contextlib.contextmanager`. It can be called with ``with`` statement, and when exists from the ``with`` statement, the temporary path will be released. @@ -192,7 +192,7 @@ class OSSStorage(Storage): self, filepath: str) -> Generator[Union[str, Path], None, None]: """Download a file from ``filepath``. - ``as_local_path`` is decorated by :meth:`contxtlib.contextmanager`. It + ``as_local_path`` is decorated by :meth:`contextlib.contextmanager`. It can be called with ``with`` statement, and when exists from the ``with`` statement, the temporary path will be released. diff --git a/modelscope/hub/deploy.py b/modelscope/hub/deploy.py index 8cacde82..3b1c9cfc 100644 --- a/modelscope/hub/deploy.py +++ b/modelscope/hub/deploy.py @@ -36,7 +36,7 @@ class EASRegion(object): class EASCpuInstanceType(object): - """EAS Cpu Instance TYpe, ref(https://help.aliyun.com/document_detail/144261.html) + """EAS Cpu Instance Type, ref(https://help.aliyun.com/document_detail/144261.html) """ tiny = 'ecs.c6.2xlarge' small = 'ecs.c6.4xlarge' @@ -45,7 +45,7 @@ class EASCpuInstanceType(object): class EASGpuInstanceType(object): - """EAS Cpu Instance TYpe, ref(https://help.aliyun.com/document_detail/144261.html) + """EAS Gpu Instance Type, ref(https://help.aliyun.com/document_detail/144261.html) """ tiny = 'ecs.gn5-c28g1.7xlarge' small = 'ecs.gn5-c8g1.4xlarge' diff --git a/modelscope/hub/file_download.py b/modelscope/hub/file_download.py index 042ea6a6..6c9c06b5 100644 --- a/modelscope/hub/file_download.py +++ b/modelscope/hub/file_download.py @@ -165,7 +165,7 @@ def get_file_download_url(model_id: str, file_path: str, revision: str): """ Format file download url according to `model_id`, `revision` and `file_path`. e.g., Given `model_id=john/bert`, `revision=master`, `file_path=README.md`, - the resulted download url is: https://modelscope.co/api/v1/models/john/bert/repo?Revision=master&FilePath=README.md + the resulted download url is: https://modelscope.cn/api/v1/models/john/bert/repo?Revision=master&FilePath=README.md """ download_url_template = '{endpoint}/api/v1/models/{model_id}/repo?Revision={revision}&FilePath={file_path}' return download_url_template.format( diff --git a/modelscope/metrics/image_denoise_metric.py b/modelscope/metrics/image_denoise_metric.py index 1692f299..cbbd1ea1 100644 --- a/modelscope/metrics/image_denoise_metric.py +++ b/modelscope/metrics/image_denoise_metric.py @@ -86,7 +86,7 @@ def calculate_psnr(img1, img2, crop_border, input_order='HWC'): """ assert img1.shape == img2.shape, ( - f'Image shapes are differnet: {img1.shape}, {img2.shape}.') + f'Image shapes are different: {img1.shape}, {img2.shape}.') if input_order not in ['HWC', 'CHW']: raise ValueError( f'Wrong input_order {input_order}. Supported input_orders are ' @@ -141,7 +141,7 @@ def calculate_ssim(img1, img2, crop_border, input_order='HWC', ssim3d=True): """ assert img1.shape == img2.shape, ( - f'Image shapes are differnet: {img1.shape}, {img2.shape}.') + f'Image shapes are different: {img1.shape}, {img2.shape}.') if input_order not in ['HWC', 'CHW']: raise ValueError( f'Wrong input_order {input_order}. Supported input_orders are ' diff --git a/tests/trainers/test_finetune_token_classificatin.py b/tests/trainers/test_finetune_token_classification.py similarity index 100% rename from tests/trainers/test_finetune_token_classificatin.py rename to tests/trainers/test_finetune_token_classification.py