Skip to content

Extremely verbose logging with "Epoch 1 loss 0.132985497437162 time 0ms" #1366

@wickedest

Description

@wickedest

Describe the bug

When using the nlu, the library emits 418 log messages of the form:

Epoch 1 loss 0.132985497437162 time 0ms
Epoch 418 loss 0.00014440620801799714 time 0ms

There is no way to disable it from configuration that I could find. I created MR #1363 that shows how to disable it permanently. From the MR:

The nlu was configured to log by default. I am pretty sure that it cannot be disabled programmatically because there are no settings passed into it from the nlu. It is also extremely annoying to have these log messages output by default. All I did was disable it, but imo, it should probably be using the configured logger, instead of a console.log. I'd also expect that maybe some settings should be passed into the train().

It is extremely annoying. Please fix.

To Reproduce

		const dock = await dockStart({
			settings: {
				log: false,
				nlp: {
					forceNER: true,
					log: false,
					languages: ['en'],
					corpora: [
						path.join(corpus_root, 'en', 'corpus-en-music.json'),
						path.join(corpus_root, 'en', 'corpus-en.json')
					]
				},
				nlu: {
					log: false
				}
			},
			use: [
				'Basic',
				'Nlp',
			]
		});

		const manager = dock.get('nlp');

		const ner = dock.get('ner');
		const builtin = new BuiltinMicrosoft();
		ner.container.register('extract-builtin-??', builtin);
		await manager.train();

Expected behavior
Verbose logging should not be enabled by default.
Logging should be configurable.

Desktop (please complete the following information):

  • Node version 20

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions