Initialize the Euler graph driver used in Tensorflow. Args: config: str or dict of Euler graph driver configuration. Return: A boolean indicate whether the graph driver is initialized successfully. Raises: TypeError: if config is neither str nor dict.
(config)
| 35 | |
| 36 | |
| 37 | def initialize_graph(config): |
| 38 | """ |
| 39 | Initialize the Euler graph driver used in Tensorflow. |
| 40 | |
| 41 | Args: |
| 42 | config: str or dict of Euler graph driver configuration. |
| 43 | |
| 44 | Return: |
| 45 | A boolean indicate whether the graph driver is initialized successfully. |
| 46 | |
| 47 | Raises: |
| 48 | TypeError: if config is neither str nor dict. |
| 49 | """ |
| 50 | if isinstance(config, dict): |
| 51 | config = ';'.join( |
| 52 | '{}={}'.format(key, value) for key, value in config.items()) |
| 53 | if not isinstance(config, str): |
| 54 | raise TypeError('Expect str or dict for graph config, ' |
| 55 | 'got {}.'.format(type(config).__name__)) |
| 56 | |
| 57 | if not isinstance(config, bytes): |
| 58 | config = config.encode() |
| 59 | |
| 60 | return _LIB.InitQueryProxy(config) |
| 61 | |
| 62 | |
| 63 | def initialize_embedded_graph(data_dir, sampler_type='all', data_type='all'): |
no outgoing calls
no test coverage detected