当前位置: 首页 > news >正文

网站建设设计大作业平台推广计划

网站建设设计大作业,平台推广计划,网站建设方案合同,京美建站官网1.什么是fate-serving-server? FATE-Serving 是一个高性能、工业化的联邦学习模型服务系统,专为生产环境而设计,主要用于在线推理。 2.fate-serving-server源码编译 下载fate-serving-serving项目(GitHub - FederatedAI/FATE-Serving: A scalable, h…

1.什么是fate-serving-server?

FATE-Serving 是一个高性能、工业化的联邦学习模型服务系统,专为生产环境而设计,主要用于在线推理。

2.fate-serving-server源码编译

下载fate-serving-serving项目(GitHub - FederatedAI/FATE-Serving: A scalable, high-performance serving system for federated learning models),并执行下面的命令

mvn clean
mvn package

3.修改日志输出等级

修改AsyncRoot的level等级为debug

修改AppenderRef中的info和console的日志等级为debug

具体配置文件如下:

<?xml version="1.0" encoding="UTF-8"?>
<!--~ Copyright 2019 The FATE Authors. All Rights Reserved.~~ Licensed under the Apache License, Version 2.0 (the "License");~ you may not use this file except in compliance with the License.~ You may obtain a copy of the License at~~     http://www.apache.org/licenses/LICENSE-2.0~~ Unless required by applicable law or agreed to in writing, software~ distributed under the License is distributed on an "AS IS" BASIS,~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.~ See the License for the specific language governing permissions and~ limitations under the License.-->
<Configuration status="ERROR" monitorInterval="60"><Properties><Property name="logdir">logs</Property><Property name="project">fate</Property><Property name="module">serving-server</Property></Properties><Appenders><Console name="console" target="SYSTEM_OUT"><PatternLayout charset="UTF-8"pattern="%d{yyyy-MM-dd HH:mm:ss,SSS} [%-5p] %c{1.}(%F:%L) - %m%n"/></Console><RollingFile name="info" fileName="${logdir}/${project}-${module}.log"filePattern="${logdir}/%d{yyyy-MM-dd}/${project}-${module}.log.%d{yyyy-MM-dd}"><PatternLayout charset="UTF-8" pattern="%d{yyyy-MM-dd HH:mm:ss,SSS} [%-5p] %c{1.}(%F:%L) - %m%n"/><Policies><TimeBasedTriggeringPolicy/></Policies><DefaultRolloverStrategy max="24"/></RollingFile><RollingFile name="flow" fileName="${logdir}/flow.log"filePattern="${logdir}/%d{yyyy-MM-dd}/flow.log.%d{yyyy-MM-dd}.log"><PatternLayout charset="UTF-8" pattern="%d{yyyy-MM-dd HH:mm:ss,SSS}|%m%n"/><Policies><TimeBasedTriggeringPolicy/></Policies><DefaultRolloverStrategy max="24"/></RollingFile><RollingFile name="error" fileName="${logdir}/${project}-${module}-error.log"filePattern="${logdir}/${project}-${module}-error.log.%d{yyyy-MM-dd}.log"><PatternLayout charset="UTF-8" pattern="%d{yyyy-MM-dd HH:mm:ss,SSS} [%-5p] %c{1.}(%F:%L) - %m%n"/><Policies><TimeBasedTriggeringPolicy/></Policies><DefaultRolloverStrategy max="24"/></RollingFile><RollingFile name="debug" fileName="${logdir}/${project}-${module}-debug.log"filePattern="${logdir}/${project}-${module}-debug.log.%d{yyyy-MM-dd}.log"><PatternLayout charset="UTF-8" pattern="%d{yyyy-MM-dd HH:mm:ss,SSS} [%-5p] %c{1.}(%F:%L) - %m%n"/><Policies><TimeBasedTriggeringPolicy/></Policies><DefaultRolloverStrategy max="24"/></RollingFile></Appenders><Loggers><logger name="org.apache.zookeeper" level="WARN"></logger><AsyncLogger name="flow" level="info" includeLocation="true" additivity="true"><AppenderRef ref="flow"/></AsyncLogger><!--<AsyncLogger name="debug" level="debug" includeLocation="true" additivity="false"><AppenderRef ref="debug"/></AsyncLogger>--><AsyncRoot level="debug" includeLocation="true"><AppenderRef ref="console" level="debug"/><AppenderRef ref="info" level="debug"/><AppenderRef ref="error" level="error"/></AsyncRoot></Loggers>
</Configuration>

4.在mockAdater增加host自定义取数逻辑

1.找到MockAdapter.java中的getData方法(取数逻辑)

/** Copyright 2019 The FATE Authors. All Rights Reserved.** Licensed under the Apache License, Version 2.0 (the "License");* you may not use this file except in compliance with the License.* You may obtain a copy of the License at**     http://www.apache.org/licenses/LICENSE-2.0** Unless required by applicable law or agreed to in writing, software* distributed under the License is distributed on an "AS IS" BASIS,* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.* See the License for the specific language governing permissions and* limitations under the License.*/package com.webank.ai.fate.serving.adaptor.dataaccess;import com.webank.ai.fate.serving.core.bean.Context;
import com.webank.ai.fate.serving.core.bean.ReturnResult;
import com.webank.ai.fate.serving.core.constant.StatusCode;
import com.webank.ai.fate.serving.core.utils.JsonUtil;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;import java.util.HashMap;
import java.util.Map;public class MockAdapter extends AbstractSingleFeatureDataAdaptor {private static final Logger logger = LoggerFactory.getLogger(MockAdapter.class);@Overridepublic void init() {environment.getProperty("port");}@Overridepublic ReturnResult getData(Context context, Map<String, Object> featureIds) {logger.info("getData_featureIds:{}", featureIds);logger.info("Context:{}", context);logger.info("appId:{} callName:{} actionType:{} caseId:{},serviceId:{} servoceName:{}",context.getApplyId(), context.getCallName(), context.getActionType(), context.getCaseId(),context.getServiceId(), context.getServiceName());ReturnResult returnResult = new ReturnResult();Map<String, Object> data = new HashMap<>();try {String mockData = "x0:1,x1:5,x2:13,x3:58,x4:95,x5:352,x6:418,x7:833,x8:888,x9:937,x10:32776";for (String kv : StringUtils.split(mockData, ",")) {String[] a = StringUtils.split(kv, ":");data.put(a[0], Double.valueOf(a[1]));}returnResult.setData(data);returnResult.setRetcode(StatusCode.SUCCESS);if (logger.isDebugEnabled()) {logger.debug("MockAdapter result, {}", JsonUtil.object2Json(returnResult));}} catch (Exception ex) {logger.error(ex.getMessage());returnResult.setRetcode(StatusCode.SYSTEM_ERROR);}return returnResult;}
}
  1. 默认的取数逻辑是一个x0-x10的一个默认值,替换旧的取数逻辑
  2. 重新打包fate-serving-extension服务并替换对应的jar包

http://www.hengruixuexiao.com/news/11665.html

相关文章:

  • 做外贸都做哪些网站好免费下载营销培训课程视频
  • 门户网站建设 知乎深圳网络推广外包
  • 西安网站设计公司哪家好关键词优化公司哪家推广
  • 有哪些企业可以做招聘的网站有哪些方面如何广告推广
  • 昆明网站开发公司媒体发布公司
  • 做网站开发要具备什么知识公司网站建设公司
  • 怎么用dw做可上传文件的网站如何搭建一个网站平台
  • 新疆建设兵团医院网站长尾词挖掘工具
  • 泉州建设网站公司哪家好成都网站优化seo
  • 北京的网站设计公司网站seo排名优化方法
  • 哈尔滨做网站企业国内快速建站
  • 顺义企业建站seo综合查询软件排名
  • wordpress app模板下载深圳推广优化公司
  • 法律问题咨询哪个网站做的好济南seo优化外包服务
  • 唐山网站建设哪家好怎样做网站的优化、排名
  • 手机上上建设网站南昌关键词优化软件
  • 网站制作公司昆明网站优化推广哪家好
  • 上海做推广的引流公司seo常见优化技术
  • 潍坊建设部门管理网站seo软件工具
  • wordpress打开刷新2次网络seo关键词优化技术
  • 顺德外贸网站建设专业培训
  • 为什么网站建设图片显示不出来第三方平台推广引流
  • 卖设计图的网站网站服务器速度对seo有什么影响
  • 欧美风网站建设百度域名
  • 瑞金网站建设光龙使用网站模板快速建站
  • 自己用笔记本做网站济南做seo的公司排名
  • 公司做一个网站内容如何设计网络推广的渠道有哪些
  • 会计题库网站怎么做怎样制作网站教程
  • 网页制作怎么上传到网站泰州百度公司代理商
  • 网站设计广州seo整站优化