(port: int)
| 29 | |
| 30 | |
| 31 | def _is_free_port(port: int) -> bool: |
| 32 | ips = socket.gethostbyname_ex(socket.gethostname())[-1] |
| 33 | ips.append('localhost') |
| 34 | with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s: |
| 35 | return all(s.connect_ex((ip, port)) != 0 for ip in ips) |
| 36 | |
| 37 | |
| 38 | def compile_model(model, **compile_options): |
no test coverage detected
searching dependent graphs…