Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(bin): init_model API changed #2116

Merged
merged 1 commit into from
Nov 6, 2023
Merged

fix(bin): init_model API changed #2116

merged 1 commit into from
Nov 6, 2023

Conversation

xingchensong
Copy link
Member

jit and onnx work

2d657436-8842-4a0e-9178-55dfd284c153

a41c3598-15c9-4a73-9f53-3e22dcd46642

@@ -48,6 +49,8 @@ def init_model(configs):
def main():

args = get_args()
logging.basicConfig(level=logging.DEBUG,
format='%(asctime)s %(levelname)s %(message)s')
with open(args.config, 'r') as fin:
configs = yaml.load(fin, Loader=yaml.FullLoader)
model = init_model(configs)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里增加logging是因为load_checkpoint里的logging.info需要初始化config,不然不会打印值

@@ -132,7 +132,6 @@ def init_model(args, configs):
if args.checkpoint is not None:
infos = load_checkpoint(model, args.checkpoint)
elif args.enc_init is not None:
logging.info('load pretrained encoders: {}'.format(args.enc_init))
infos = load_trained_modules(model, args)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

load_trained_modules 里 有logging,这里去掉冗余log

@robin1001 robin1001 merged commit ad0836b into main Nov 6, 2023
6 checks passed
@robin1001 robin1001 deleted the xcsong-fix branch November 6, 2023 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants