Breakend / experiment-impact-tracker

MIT License
266 stars 31 forks source link

Tutorial on how to run #3

Closed otnemrasordep closed 4 years ago

otnemrasordep commented 4 years ago

Hello,

Is there any chance of any a grokking tutorial on how to run the experiment-impact-tracker? I was using jupyter notebooks and face some issues after running generate-carbon-impact-statement. I'm fairly new to programming (but I would like to be aware of my algorithms' impact from the start) and maybe I missed something really basic. So far, my steps were:

  1. Import experiment-impact-tracker using pip
  2. In my jupyter notebook call from experiment_impact_tracker.compute_tracker import ImpactTracker tracker = ImpactTracker(<your log directory here>) tracker.launch_impact_monitor() (some warnings are thrown)
  3. Importing generate-carbon-impact-statementscript
  4. Running it from the terminal, providing the directory where my ImpactLogs folder is and using "GBR" as ISO3Code

Amongst an extensive list of erros, it finishes with is:

  File "/homes/pps30/venvs/venv_dl4am_a1/lib/python3.6/site-packages/experiment_impact_tracker/utils.py", line 101, in gather_additional_info
    exp_len = datetime.timestamp(info["experiment_end"]) - \
KeyError: 'experiment_end'

Maybe this is very vague for me to get any help, but in any case.

Thank you very much for your tool!

Breakend commented 4 years ago

Hi, sorry to hear you're having trouble. I guess a tutorial might be helpful, I'll work on putting one together!

For your specific issue, could you provide me with the logs that were generated and what the warnings were? I never ran it using jupyter notebook and didn't intend for it to be used that way. We use an atexit hook which does all the wrap up logging (like this key that's missing). I suspect that the jupyter script never ends so the process just keeps on logging and running. If it's helpful I can add a function that you can call to explicitly end logging within the jupyter notebook?

otnemrasordep commented 4 years ago

Hello. Thank you very much for your quick reply.

This is how I'm running it in my jupyter notebook: image

I'm also attaching my ImpactLogs folder. ImpactLogs.zip

If it is not too much work, a function to end logging would be useful, I think.

Thank you for your help once again!

Breakend commented 4 years ago

Tracking this request #5 and the tutorial request in #4. Will include for next release