Fix some words (#141)

This commit is contained in:
chenxujun
2023-03-02 11:06:56 +08:00
committed by GitHub
parent 70d3799b26
commit 20b3a679e7
5 changed files with 15 additions and 15 deletions

View File

@@ -45,7 +45,7 @@ for i in "$@"; do
;;
--modelscope=*)
modelscope_version="${i#*=}"
shift # cudatoolkit for pytorch
shift # modelscope version
;;
--test)
run_ci_test=True
@@ -65,7 +65,7 @@ for i in "$@"; do
;;
--push)
is_push=True
shift # is dsw, will set dsw cache location
shift # option for push image to remote repo
;;
--help)
usage
@@ -126,7 +126,7 @@ echo "$is_dsw"
if [ "$is_dsw" == "False" ]; then
echo "Not DSW image"
else
echo "Building dsw image well need set ModelScope lib cache location."
echo "Building dsw image will need set ModelScope lib cache location."
docker_file_content="${docker_file_content} \nENV MODELSCOPE_CACHE=/mnt/workspace/.cache/modelscope"
fi
if [ "$is_ci_test" == "True" ]; then

View File

@@ -10,7 +10,7 @@ We use the following toolsseed isortseed isortseed isort for linting and formatt
Style configurations of yapf and isort can be found in [setup.cfg](../../setup.cfg).
We use [pre-commit hook](https://pre-commit.com/) that checks and formats for `flake8`, `yapf`, `seed-isort-config`, `isort`, `trailing whitespaces`,
fixes `end-of-files`, sorts `requirments.txt` automatically on every commit.
fixes `end-of-files`, sorts `requirements.txt` automatically on every commit.
The config for a pre-commit hook is stored in [.pre-commit-config](../../.pre-commit-config.yaml).
After you clone the repository, you will need to install initialize pre-commit hook.
```bash
@@ -81,7 +81,7 @@ exists in the environment and unset it.
python tests/path/to/your_test.py
```
2. Remember to run core tests in local environment before start a codereview, by default it will
2. Remember to run core tests in local environment before start a code review, by default it will
only run test cases with level 0.
```bash
make tests
@@ -153,7 +153,7 @@ git pull origin branch_name
git add .
git commit -m "[to #42322933] my commit message"
```
note: you may replace [to #42322933] with your own aone issue id (if any).
note: you may replace [to #42322933] with your own alone issue id (if any).
4. Push your change:
```shell
git push --set-upstream origin dev/my-dev-branch

View File

@@ -68,7 +68,7 @@ class CsanmtForTranslationExporter(TfModelExporter):
dummy_inputs = self.generate_dummy_inputs()
with tf.Session(graph=tf.Graph()) as sess:
# Restore model from the saved_modle file, that is exported by TensorFlow estimator.
# Restore model from the saved_model file, that is exported by TensorFlow estimator.
MetaGraphDef = tf.saved_model.loader.load(sess, ['serve'],
output_dir)
@@ -181,5 +181,5 @@ class CsanmtForTranslationExporter(TfModelExporter):
def export_onnx(self, output_dir: str, opset=13, **kwargs):
raise NotImplementedError(
'csanmt model does not support onnx format, consider using savedmodel instead.'
'csanmt model does not support onnx format, consider using saved model instead.'
)

View File

@@ -125,7 +125,7 @@ class HubApi:
visibility: Optional[int] = ModelVisibility.PUBLIC,
license: Optional[str] = Licenses.APACHE_V2,
chinese_name: Optional[str] = None) -> str:
"""Create model repo at ModelScopeHub.
"""Create model repo at ModelScope Hub.
Args:
model_id (str): The model id

View File

@@ -8,7 +8,7 @@ from typing import Any
from modelscope.utils.logger import get_logger
logger = get_logger()
SYSTEM_TRAINER_BUILDER_FINCTION_NAME = 'build_trainer'
SYSTEM_TRAINER_BUILDER_FUNCTION_NAME = 'build_trainer'
SYSTEM_TRAINER_BUILDER_PARAMETER_NAME = 'name'
SYSTEM_PIPELINE_BUILDER_FUNCTION_NAME = 'pipeline'
SYSTEM_PIPELINE_BUILDER_PARAMETER_NAME = 'task'
@@ -263,12 +263,12 @@ def analysis_trainer_test_suite(test_file, modified_register_modules):
# get test file global function and test class
test_suite_root = ast.parse(src, test_file)
test_suite_analyzer = AnalysisTestFile(
test_file, SYSTEM_TRAINER_BUILDER_FINCTION_NAME)
test_file, SYSTEM_TRAINER_BUILDER_FUNCTION_NAME)
test_suite_analyzer.visit(test_suite_root)
for test_class in test_suite_analyzer.test_classes:
test_class_analyzer = AnalysisTestClass(
test_class, SYSTEM_TRAINER_BUILDER_FINCTION_NAME)
test_class, SYSTEM_TRAINER_BUILDER_FUNCTION_NAME)
test_class_analyzer.visit(test_class)
for test_method in test_class_analyzer.test_methods:
for idx, custom_global_builder in enumerate(
@@ -278,7 +278,7 @@ def analysis_trainer_test_suite(test_file, modified_register_modules):
test_method, test_class_analyzer.setup_variables,
custom_global_builder,
test_suite_analyzer.custom_global_builder_calls[idx],
SYSTEM_TRAINER_BUILDER_FINCTION_NAME,
SYSTEM_TRAINER_BUILDER_FUNCTION_NAME,
SYSTEM_TRAINER_BUILDER_PARAMETER_NAME)
if trainer_name is not None:
tested_trainers.append(trainer_name)
@@ -289,14 +289,14 @@ def analysis_trainer_test_suite(test_file, modified_register_modules):
test_method, test_class_analyzer.setup_variables,
custom_class_method_builder,
test_class_analyzer.custom_class_method_builder_calls[idx],
SYSTEM_TRAINER_BUILDER_FINCTION_NAME,
SYSTEM_TRAINER_BUILDER_FUNCTION_NAME,
SYSTEM_TRAINER_BUILDER_PARAMETER_NAME)
if trainer_name is not None:
tested_trainers.append(trainer_name)
trainer_name = get_builder_parameter_value(
test_method, test_class_analyzer.setup_variables, None, None,
SYSTEM_TRAINER_BUILDER_FINCTION_NAME,
SYSTEM_TRAINER_BUILDER_FUNCTION_NAME,
SYSTEM_TRAINER_BUILDER_PARAMETER_NAME
) # direct call the build_trainer
if trainer_name is not None: