Skip to content

Commit

Permalink
Merge branch 'mindspore-lab:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
BaolanChen authored Nov 20, 2024
2 parents 6427e9e + 6285685 commit 796ac61
Show file tree
Hide file tree
Showing 2,905 changed files with 1,303,254 additions and 63,278 deletions.
3 changes: 0 additions & 3 deletions .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ assignees: ''

---

If this is your first time, please read our contributor guidelines:
https://github.com/mindspore-lab/mindcv/blob/main/CONTRIBUTING.md

**Describe the bug/ 问题描述 (Mandatory / 必填)**
A clear and concise description of what the bug is.

Expand Down
2 changes: 0 additions & 2 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ assignees: ''

---

If this is your first time, please read our contributor guidelines: https://gitee.com/mindspore/mindspore/blob/master/CONTRIBUTING.md

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Expand Down
29 changes: 17 additions & 12 deletions .github/install_mindspore.py
Original file line number Diff line number Diff line change
@@ -1,28 +1,33 @@
import re
import requests
import os
import platform

def gen_url(os, py_version):
hf_url = 'https://huggingface.co/lvyufeng/mindspore-daily/resolve/main/'
def gen_url(os_name, py_version):
hf_url = 'https://hf.co/lvyufeng/mindspore-daily/resolve/main/'
whl_name = 'mindspore-newest-cp{}-cp{}-{}.whl'
py_version = py_version.replace('.', '')

if os == 'ubuntu-latest':
platform = 'linux_x86_64'
elif os == 'macos-latest':
platform = 'macosx_10_15_x86_64'
elif os == 'windows-latest':
platform = 'win_amd64'
if os_name == 'ubuntu-latest' or 'linux' in os_name:
os_type = 'linux_x86_64'
elif os_name == 'macos-latest' or 'mac' in os_name:
machine = platform.machine()
if machine.startswith('arm'):
os_type = 'macosx_11_0_arm64'
else:
os_type = 'macosx_10_15_x86_64'
elif os_name == 'windows-latest':
os_type = 'win_amd64'
else:
raise ValueError(f'not support this operate system {os}')
raise ValueError(f'not support this operate system {os_name}')

py_version2 = py_version if py_version != '37' else py_version + 'm'
whl_name = whl_name.format(py_version, py_version2, platform)
whl_name = whl_name.format(py_version, py_version2, os_type)

with open('download.txt', 'w', encoding='utf-8') as f:
f.write(hf_url + whl_name)

if __name__ == '__main__':
platform = os.environ['OS']
os_type = os.environ['OS']
python = os.environ['PYTHON']
gen_url(platform, python)
gen_url(os_type, python)
6 changes: 3 additions & 3 deletions .github/kaggle_gpu_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

os.system("git clone https://github.com/mindspore-lab/mindnlp")
os.chdir("mindnlp")
os.system("conda create -n mindspore python=3.7.5 cudatoolkit=11.1 cudnn -y")
os.system("conda create -n mindspore python=3.9 cudatoolkit=11.1 cudnn -y")
os.system("/opt/conda/envs/mindspore/bin/pip install -r requirements/requirements.txt")
os.system("/opt/conda/envs/mindspore/bin/pip install https://huggingface.co/lvyufeng/mindspore-daily/resolve/main/mindspore-newest-cp37-cp37m-linux_x86_64.whl")
return_code = os.system("/opt/conda/envs/mindspore/bin/pytest -m 'not download'")
os.system("/opt/conda/envs/mindspore/bin/pip install https://hf-mirror.com/lvyufeng/mindspore-daily/resolve/main/mindspore-newest-cp39-cp39-linux_x86_64.whl")
return_code = os.system("/opt/conda/envs/mindspore/bin/pytest tests -c pytest.ini -m 'not download'")
if return_code:
raise Exception("tests failed.")
92 changes: 75 additions & 17 deletions .github/pylint.conf
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ persistent=yes

# Minimum Python version to use for version dependent checks. Will default to
# the version used to run pylint.
py-version=3.7
py-version=3.11

# Discover python modules and packages in the file system subtree.
recursive=no
Expand Down Expand Up @@ -132,7 +132,7 @@ score=yes
# all. Valid levels: HIGH, CONTROL_FLOW, INFERENCE, INFERENCE_FAILURE,
# UNDEFINED.
confidence=HIGH,
CONTROL_FLOW,
# CONTROL_FLOW,
INFERENCE,
INFERENCE_FAILURE,
UNDEFINED
Expand All @@ -159,13 +159,71 @@ disable=raw-checker-failed,
duplicate-code,
consider-using-with,
too-few-public-methods,
no-member
no-member,
protected-access,
abstract-method,
invalid-name,
missing-class-docstring,
missing-function-docstring,
inconsistent-return-statements,
redefined-builtin,
unused-variable,
unused-argument,
arguments-renamed,
no-else-raise,
no-else-return,
consider-using-enumerate,
consider-using-f-string,
cyclic-import,
eval-used,
ungrouped-imports,
c-extension-no-member,
global-statement,
unspecified-encoding,
attribute-defined-outside-init,
chained-comparison,
invalid-unary-operand-type,
super-with-arguments,
consider-iterating-dictionary,
anomalous-backslash-in-string,
no-else-break,
redefined-argument-from-local,
dangerous-default-value,
import-outside-toplevel,
superfluous-parens,
broad-exception-raised,
broad-exception-caught,
bare-except,
signature-differs,
not-an-iterable,
arguments-out-of-order,
consider-using-dict-items,
singleton-comparison,
unidiomatic-typecheck,
unnecessary-lambda,
unnecessary-dunder-call,
no-self-argument,
redefined-outer-name,
invalid-sequence-index,
logging-fstring-interpolation,
try-except-raise,
raise-missing-from,
pointless-string-statement,
redundant-keyword-arg,
too-many-function-args,
assignment-from-none,
use-dict-literal,
consider-using-generator,
fixme,
use-a-generator,
nested-min-max,
method-hidden

# Enable the message, report, category or checker with the given id(s). You can
# either give multiple identifier separated by comma (,) or put this option
# multiple time (only on the command line, not in the configuration file where
# it should appear only once). See also the "--disable" option for examples.
enable=c-extension-no-member
# enable=c-extension-no-member


[LOGGING]
Expand Down Expand Up @@ -341,10 +399,10 @@ indent-after-paren=4
indent-string=' '

# Maximum number of characters on a single line.
max-line-length=150
max-line-length=300

# Maximum number of lines in a module.
max-module-lines=1500
max-module-lines=5000

# Allow the body of a class to be on the same line as the declaration if body
# contains single statement.
Expand Down Expand Up @@ -408,7 +466,7 @@ overgeneral-exceptions=builtins.BaseException,
[REFACTORING]

# Maximum number of nested blocks for function / method body
max-nested-blocks=5
max-nested-blocks=10

# Complete name of functions that never returns. When checking for
# inconsistent-return-statements if a never returning function is called then
Expand Down Expand Up @@ -446,31 +504,31 @@ exclude-too-few-public-methods=
ignored-parents=

# Maximum number of arguments for function / method.
max-args=5
max-args=15

# Maximum number of attributes for a class (see R0902).
max-attributes=30
max-attributes=100

# Maximum number of boolean expressions in an if statement (see R0916).
max-bool-expr=5
max-bool-expr=20

# Maximum number of branch for function / method body.
max-branches=40
max-branches=100

# Maximum number of locals for function / method body.
max-locals=55
max-locals=100

# Maximum number of parents for a class (see R0901).
max-parents=7
max-parents=10

# Maximum number of public methods for a class (see R0904).
max-public-methods=20
max-public-methods=40

# Maximum number of return / yield for function / method body.
max-returns=6
max-returns=20

# Maximum number of statements in function / method body.
max-statements=120
max-statements=300

# Minimum number of public methods for a class (see R0903).
min-public-methods=2
Expand Down Expand Up @@ -620,4 +678,4 @@ variable-naming-style=snake_case
# Regular expression matching correct variable names. Overrides variable-
# naming-style. If left empty, variable names will be checked with the set
# naming style.
#variable-rgx=
#variable-rgx=
Loading

0 comments on commit 796ac61

Please sign in to comment.