(self, name, warmup_fun)
| 824 | (k, v) for k, v in self.cache.items() if self.is_warmed_up(v)) |
| 825 | |
| 826 | def maybe_warm_up(self, name, warmup_fun): |
| 827 | if self.is_warmed_up(self.cache.get(name, 0)): |
| 828 | return |
| 829 | |
| 830 | logging.info(f'Warm-up run of {name} - disregarding output.') |
| 831 | try: |
| 832 | warmup_fun() |
| 833 | finally: |
| 834 | self.cache[name] = time.time() |
| 835 | self.cache_handler.write_cache(self.cache) |
| 836 | logging.info(f'Warm-up done.') |
| 837 | |
| 838 | |
| 839 | class Platform(object): |
nothing calls this directly
no test coverage detected