Skip to content

Not all loggers output are captured in the GridWorkers #104

@vmarois

Description

@vmarois

When using a GridWorker, only the output of the logger of the current Worker (e.g. OfflineTrainer or Tester) is captured. The loggers of the Model & Problem are not able to write to the console or to the .log file.
This is fairly annoying as these loggers have some important information (e.g. whether the Sampler was properly instantiated, when is saved the Model etc).

Not sure yet how to fix this. I think this is related to the logging.config and also how the output of a child process is captured in the GridWorker:

with open(os.devnull, 'w') as devnull:
result = subprocess.run(command_str.split(" "), stdout=devnull)

We should probably change stdout=os.devnull and do something instead like

with open(worker.log, 'w') as devnull:
result = subprocess.run(command_str.split(" "), stdout=devnull)

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions