代码拉取完成,页面将自动刷新
# Copyright (c) 2024 Bytedance Ltd. and/or its affiliates
# SPDX-License-Identifier: Apache-2.0
#!python
import pyrootutils
root = pyrootutils.setup_root(
search_from=__file__,
indicator=[".git", "pyproject.toml"],
pythonpath=True,
# load environment variables from `.env` file if it exists
# recursively searches for `.env` in all folders starting from work dir
dotenv=True,
)
import dotenv
import hydra
from omegaconf import DictConfig
@hydra.main(config_path=f"{root}/configs", config_name="test.yaml")
def main(config: DictConfig):
# Imports can be nested inside @hydra.main to optimize tab completion
# https://github.com/facebookresearch/hydra/issues/934
from byprot import utils
from byprot.testing_pipeline import test
# resolve user provided config
config = utils.resolve_experiment_config(config)
# Applies optional utilities
config = utils.extras(config)
# Evaluate model
return test(config)
if __name__ == "__main__":
main()
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。