Return experiment_id resolved from the same hierarchical config strategy used by EmissionsTracker (global file, local file, then CODECARBON_* env).
()
| 40 | |
| 41 | |
| 42 | def get_existing_exp_id() -> Optional[str]: |
| 43 | """ |
| 44 | Return experiment_id resolved from the same hierarchical config strategy |
| 45 | used by EmissionsTracker (global file, local file, then CODECARBON_* env). |
| 46 | """ |
| 47 | try: |
| 48 | conf = get_hierarchical_config() |
| 49 | except KeyError: |
| 50 | return None |
| 51 | return conf.get("experiment_id") |
| 52 | |
| 53 | |
| 54 | def write_local_exp_id(exp_id, path: Optional[Path] = None): |
no test coverage detected
searching dependent graphs…