mlflow.yaml 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. # Licensed to the Apache Software Foundation (ASF) under one
  2. # or more contributor license agreements. See the NOTICE file
  3. # distributed with this work for additional information
  4. # regarding copyright ownership. The ASF licenses this file
  5. # to you under the Apache License, Version 2.0 (the
  6. # "License"); you may not use this file except in compliance
  7. # with the License. You may obtain a copy of the License at
  8. #
  9. # http://www.apache.org/licenses/LICENSE-2.0
  10. #
  11. # Unless required by applicable law or agreed to in writing,
  12. # software distributed under the License is distributed on an
  13. # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  14. # KIND, either express or implied. See the License for the
  15. # specific language governing permissions and limitations
  16. # under the License.
  17. # Define variable `mlflow_tracking_uri`
  18. mlflow_tracking_uri: &mlflow_tracking_uri "http://127.0.0.1:5000"
  19. # Define the workflow
  20. workflow:
  21. name: "MLflow"
  22. # Define the tasks under the workflow
  23. tasks:
  24. - name: train_xgboost_native
  25. task_type: MLFlowProjectsCustom
  26. repository: https://github.com/mlflow/mlflow#examples/xgboost/xgboost_native
  27. mlflow_tracking_uri: *mlflow_tracking_uri
  28. parameters: -P learning_rate=0.2 -P colsample_bytree=0.8 -P subsample=0.9
  29. experiment_name: xgboost
  30. - name: train_automl
  31. task_type: MLFlowProjectsAutoML
  32. mlflow_tracking_uri: *mlflow_tracking_uri
  33. parameters: time_budget=30;estimator_list=['lgbm']
  34. experiment_name: automl_iris
  35. model_name: iris_A
  36. automl_tool: flaml
  37. data_path: /data/examples/iris
  38. - name: deploy_docker
  39. task_type: MLflowModels
  40. deps: [train_automl]
  41. model_uri: models:/iris_A/Production
  42. mlflow_tracking_uri: *mlflow_tracking_uri
  43. deploy_mode: DOCKER
  44. port: 7002
  45. - name: train_basic_algorithm
  46. task_type: MLFlowProjectsBasicAlgorithm
  47. mlflow_tracking_uri: *mlflow_tracking_uri
  48. parameters: n_estimators=200;learning_rate=0.2
  49. experiment_name: basic_algorithm_iris
  50. model_name: iris_B
  51. algorithm: lightgbm
  52. data_path: /data/examples/iris
  53. search_params: max_depth=[5, 10];n_estimators=[100, 200]
  54. - name: deploy_mlflow
  55. deps: [train_basic_algorithm]
  56. task_type: MLflowModels
  57. model_uri: models:/iris_B/Production
  58. mlflow_tracking_uri: *mlflow_tracking_uri
  59. deploy_mode: MLFLOW
  60. port: 7001