refactor: 优化参数传递,清理导入样式
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
from pathlib import Path
|
||||
|
||||
from huggingface_hub import snapshot_download
|
||||
|
||||
PROJECT_ROOT = Path(__file__).resolve().parents[2]
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
import torch
|
||||
from pathlib import Path
|
||||
|
||||
import torch
|
||||
|
||||
from astrai.config.param_config import ModelParameter
|
||||
from astrai.inference.generator import GeneratorFactory, GenerationRequest
|
||||
from astrai.inference.generator import GenerationRequest, GeneratorFactory
|
||||
|
||||
PROJECT_ROOT = Path(__file__).resolve().parents[2]
|
||||
PARAMETER_ROOT = Path(PROJECT_ROOT, "params")
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
import torch
|
||||
from pathlib import Path
|
||||
|
||||
import torch
|
||||
|
||||
from astrai.config.param_config import ModelParameter
|
||||
from astrai.inference.generator import GeneratorFactory, GenerationRequest
|
||||
from astrai.inference.generator import GenerationRequest, GeneratorFactory
|
||||
|
||||
PROJECT_ROOT = Path(__file__).resolve().parents[2]
|
||||
PARAMETER_ROOT = Path(PROJECT_ROOT, "params")
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
import torch
|
||||
from pathlib import Path
|
||||
|
||||
import torch
|
||||
|
||||
from astrai.config.param_config import ModelParameter
|
||||
from astrai.inference.generator import GeneratorFactory, GenerationRequest
|
||||
from astrai.inference.generator import GenerationRequest, GeneratorFactory
|
||||
|
||||
PROJECT_ROOT = Path(__file__).resolve().parents[2]
|
||||
PARAMETER_ROOT = Path(PROJECT_ROOT, "params")
|
||||
|
||||
Reference in New Issue
Block a user