model_predict_analyse.py 729 B

12345678910111213141516171819202122
  1. import argparse
  2. import sys
  3. from hdfs import InsecureClient
  4. client = InsecureClient("http://master-1-1.c-7f31a3eea195cb73.cn-hangzhou.emr.aliyuncs.com")
  5. if __name__ == '__main__':
  6. # parser = argparse.ArgumentParser(description="model_predict_analyse.py")
  7. # parser.add_argument("-p", "--predict_path_list", type=list, help="config file path")
  8. # args = parser.parse_args()
  9. #
  10. # predict_path_list = args.predict_path_list
  11. # # 判断参数是否正常
  12. # if len(predict_path_list) != 2:
  13. # sys.exit(1)
  14. with client.read("/dw/recommend/model/34_ad_predict_data/20241004_351_0927_1003_1000/*",
  15. encoding="utf-8") as reader:
  16. content = reader.read()
  17. print(content)