-
Notifications
You must be signed in to change notification settings - Fork 449
ux: move translator load msg into translator instantiation #1184
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not an appropriate action for a service object instance to take. Also as implemented this would output twice with as the message would be printed for each translation pair required [en-fr, fr-en] for example.
There is already a a logged entry as each translator is created written by langservice
.
As it stands harness
is the first required entry adding logic in _initialize_runtime_services()
to suppress the message if translation will not occur is a more acceptable pattern.
To address this opinion the code should be consistent, and the CLI UX should remain unaffected, which means coding separation of logic & presentation for CLI. That coding doesn't deliver enough value so I suggest following existing design & practice
This is the desired behaviour. We give CLI users information about what they're loading. Alternatives considered but not adopted include: a. printing an abstract, general message (uninformative - it doesn't describe what is happening in enough granularity)
I'm not sure that |
updated pending validation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This pattern works for me, a looks like a few unneeded changes and some renamed values need to be accounted for.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This message printed currently relies on information that is not required in the configuration file.
Co-authored-by: Jeffrey Martin <jmartin@Op3n4M3.dev> Signed-off-by: Leon Derczynski <leonderczynski@gmail.com>
…, refine langservice output
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, looks good!
Don't show translation loading message when not doing translation
Show message during translation service load, per instance (consistent with other CLI output behaviour)
Verification
garak -m test -p test.Test
- no globe on CLIgarak -m test -p test.Test --config riva_translation.yaml
- globe on CLI (for some valid Riva conf doing MT)