报错 : W0504 21:05:48.977192 17931 warnings.go:70] policy/v1beta1 PodSecurityPolicy is deprecated in v1.21+, unavailable in v1.25+
时间: 2023-06-13 22:03:10 浏览: 49
这是 Kubernetes 的一个警告,意思是在 Kubernetes 版本 1.21 中,PodSecurityPolicy 已被弃用,建议使用更加安全的 PodSecurityAdmission,而在 Kubernetes 版本 1.25 中,PodSecurityPolicy 将不再可用。
你可以通过更新 Kubernetes 版本来解决这个警告,或者在 Kubernetes 1.21 中开始迁移到 PodSecurityAdmission。如果你正在使用的是 Kubernetes 的托管服务,则需要联系供应商了解升级计划和时间表。
相关问题
FutureWarning: algorithm='auto' is deprecated, it will be removed in 1.3. Using 'lloyd' instead. warnings.warn(
这个警告是因为Scikit-learn库中的KMeans算法中的`algorithm`参数的默认值将在1.3版本中从`auto`更改为`lloyd`。`algorithm`参数控制KMeans算法使用的底层实现,包括`auto`、`full`、`elkan`和`lloyd`。因此,如果你在使用KMeans算法时使用了`algorithm='auto'`,则应该将其更改为`algorithm='lloyd'`以避免警告和在将来的版本中可能出现的问题。
FutureWarning: The loss 'log' was deprecated in v1.1 and will be removed in version 1.3. Use loss='log_loss' which is equivalent. warnings.warn(
这个 `FutureWarning` 是因为在 scikit-learn v1.1 中,`loss='log'` 这个参数将被废弃,建议使用 `loss='log_loss'` 来代替。所以你可以将 `loss='log'` 修改为 `loss='log_loss'`,以避免这个警告。修改后的代码示例如下:
```python
from sklearn.linear_model import SGDClassifier
# 建立多分类逻辑斯蒂回归模型
model = SGDClassifier(loss='log_loss', penalty='l2', alpha=0.0001, max_iter=1000, tol=1e-3)
# 模型训练
model.fit(merged_train_norm_vec, y_merged_train)
# 模型评估
y_pred = model.predict(valid_norm_vec)
print('Accuracy_score of initial model:', metrics.accuracy_score(y_valid, y_pred))
```
在 `SGDClassifier` 中,`loss='log_loss'` 表示使用对数损失函数来训练逻辑斯蒂回归模型,它是 `loss='log'` 的替代方案。
相关推荐
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)