Breakend / experiment-impact-tracker

MIT License
273 stars 31 forks source link

ImpactTracker Warnings #34

Closed giorgiacantisani closed 3 years ago

giorgiacantisani commented 3 years ago

Hi!

I was wondering if it is normal to get the following warnings when using ImpactTracker:

image

My code is:

# Init tracker with log path and start it in a separate process
carbon_dir = os.path.join(conf['exp_dir'], 'carbon_logs')
os.makedirs(carbon_dir, exist_ok=True)  
tracker = ImpactTracker(carbon_dir)
tracker.launch_impact_monitor() 
Breakend commented 3 years ago

This is fixed on the main branch, these are just for informing users of the timing of gathering certain metrics. It's been changed to info so it doesn't show up anymore. We'll package a new release soonish and close out this issue when it's released. If you'd like to get rid of the warnings, you can install from source for now or change this code from warn to info like in main: https://github.com/Breakend/experiment-impact-tracker/blob/a55f5d85467fe20c9543b61e1042bb19ddc6357f/experiment_impact_tracker/compute_tracker.py#L118-L120

giorgiacantisani commented 3 years ago

Thank you very much!

For the moment I solved in the following way:


tracker = ImpactTracker(carbon_dir)

c_handler = tracker.logger.handlers[0]
c_handler.setLevel(logging.CRITICAL)

tracker.launch_impact_monitor()