def build(model_name: str, model_directory: str): parsed_path = urlparse(model_directory) if parsed_path.scheme == '': return LocalModel.build(model_name, model_directory) elif parsed_path.scheme == 'gs': return GSModel.build(model_name, model_directory) elif parsed_path.scheme == 's3': return S3Model.build(model_name, model_directory)
def build(model_name: str, model_directory: str, model_version_policy: dict, batch_size, shape): parsed_path = urlparse(model_directory) if parsed_path.scheme == '': return LocalModel.build(model_name, model_directory, batch_size, shape, model_version_policy) elif parsed_path.scheme == 'gs': return GSModel.build(model_name, model_directory, batch_size, shape, model_version_policy) elif parsed_path.scheme == 's3': return S3Model.build(model_name, model_directory, batch_size, shape, model_version_policy)
def build(model_name: str, model_directory: str, model_version_policy: dict, batch_size, shape, num_ireq: int, target_device, plugin_config): parsed_path = urlparse(model_directory) if parsed_path.scheme == '': return LocalModel.build(model_name, model_directory, batch_size, shape, model_version_policy, num_ireq, target_device, plugin_config) elif parsed_path.scheme == 'gs': return GSModel.build(model_name, model_directory, batch_size, shape, model_version_policy, num_ireq, target_device, plugin_config) elif parsed_path.scheme == 's3': return S3Model.build(model_name, model_directory, batch_size, shape, model_version_policy, num_ireq, target_device, plugin_config)