From 4844ece3d551e8b13b881e2aae832b7c63f4edcc Mon Sep 17 00:00:00 2001 From: Gene Date: Thu, 11 Jan 2024 21:41:33 +0800 Subject: [PATCH] [MNT] solve W291,C408 error of flake8 in package --- learnware/specification/regular/image/cnn_gp.py | 2 +- learnware/specification/regular/text/rkme.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/learnware/specification/regular/image/cnn_gp.py b/learnware/specification/regular/image/cnn_gp.py index 84f2b13..85d8cfd 100644 --- a/learnware/specification/regular/image/cnn_gp.py +++ b/learnware/specification/regular/image/cnn_gp.py @@ -9,7 +9,7 @@ __all__ = ("NNGPKernel", "Conv2d", "ReLU", "Sequential", "ConvKP", "NonlinKP") """ With this package, we are able to accurately and efficiently compute the kernel matrix corresponding to the NNGP during the search phase. -Github Repository: https://github.com/cambridge-mlg/cnn-gp +Github Repository: https://github.com/cambridge-mlg/cnn-gp References: [1] A. Garriga-Alonso, L. Aitchison, and C. E. Rasmussen. Deep Convolutional Networks as shallow Gaussian Processes. In: International Conference on Learning Representations (ICLR'19), 2019. """ diff --git a/learnware/specification/regular/text/rkme.py b/learnware/specification/regular/text/rkme.py index a374aea..5917768 100644 --- a/learnware/specification/regular/text/rkme.py +++ b/learnware/specification/regular/text/rkme.py @@ -63,9 +63,8 @@ class RKMETextSpecification(RKMETableSpecification): def get_language_ids(X): try: text = " ".join(X) - lang = langdetect.detect(text) langs = langdetect.detect_langs(text) - return [l.lang for l in langs] + return [item.lang for item in langs] except Exception as e: logger.warning("Language detection failed.") return []