1. 提交代码,初始化项目;
This commit is contained in:
1
.python-version
Normal file
1
.python-version
Normal file
@@ -0,0 +1 @@
|
||||
3.9
|
||||
27
main.py
Normal file
27
main.py
Normal file
@@ -0,0 +1,27 @@
|
||||
import argparse
|
||||
import logging.config
|
||||
logging.config.fileConfig('./confs/logging.conf')
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
from algos.blank import test_blank_runner, test_blank_algo
|
||||
|
||||
|
||||
def run():
|
||||
logger.info("Hello World")
|
||||
test_blank_runner()
|
||||
test_blank_algo()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
# 命令行参数传递
|
||||
parser = argparse.ArgumentParser(description='Python App Runner')
|
||||
parser.add_argument('-filename', type=str, default="", help='文件名称')
|
||||
parser.add_argument('-upload', '--upload', action='store_true', help='是否上传模型')
|
||||
parser.add_argument('-save', '--save', action='store_true', help='是否保存模型')
|
||||
parser.add_argument('-online', '--online', action='store_true', help='是否生产环境')
|
||||
parse_args = parser.parse_args()
|
||||
|
||||
# 配置文件参数传递
|
||||
print(parse_args)
|
||||
run()
|
||||
10
pyproject.toml
Normal file
10
pyproject.toml
Normal file
@@ -0,0 +1,10 @@
|
||||
[project]
|
||||
name = "python-algo-template"
|
||||
version = "0.1.0"
|
||||
description = "Add your description here"
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.9"
|
||||
dependencies = [
|
||||
"torch>=2.8.0",
|
||||
"torchvision>=0.23.0",
|
||||
]
|
||||
Reference in New Issue
Block a user