kubeflow.fairing.frameworks package


kubeflow.fairing.frameworks.lightgbm module

kubeflow.fairing.frameworks.lightgbm.execute(config, docker_registry, base_image='gcr.io/kubeflow-fairing/lightgbm:latest', namespace=None, stream_log=True, cores_per_worker=None, memory_per_worker=None, pod_spec_mutators=None)

Runs the LightGBM CLI in a single pod in user’s Kubeflow cluster. Users can configure it to be a train, predict, and other supported tasks by using the right config. Please refere https://github.com/microsoft/LightGBM/blob/master/docs/Parameters.rst for more information on config options.

  • config – config entries
  • docker_registry – docker registry name
  • base_image – base image (Default value = “gcr.io/kubeflow-fairing/lightgbm:latest”)
  • namespace – k8s namespace (Default value = None)
  • stream_log – should that stream log? (Default value = True)
  • cores_per_worker – number of cores per worker (Default value = None)
  • memory_per_worker – memory value per worker (Default value = None)
  • pod_spec_mutators – pod spec mutators (Default value = None)
kubeflow.fairing.frameworks.lightgbm.generate_context_files(config, config_file_name, num_machines)

generate context files

  • config – config entries
  • config_file_name – config file name
  • num_machines – number of machines

kubeflow.fairing.frameworks.lightgbm_dist_training_init module

kubeflow.fairing.frameworks.utils module

kubeflow.fairing.frameworks.utils.get_config_value(config, field_names)

get value for a config entry

  • config
  • field_names
kubeflow.fairing.frameworks.utils.init_lightgbm_env(config_file, mlist_file)

initialize env for lightgbm

  • config_file – path to config path
  • mlist_file – path to file to write ip list

load config from a file

Parameters:config_file – config file path
kubeflow.fairing.frameworks.utils.nslookup(hostname, retries=600)

Does nslookup for the hostname and returns the IPs for it.

  • hostname – hostname to be looked up
  • retries – Number of retries before failing. In autoscaled cluster, it might take upto 10mins to create a new node so the default value is set high.(Default value = 600)

parse cluster spec env variables

kubeflow.fairing.frameworks.utils.save_properties_config_file(config, file_name=None)

save config into a file

  • config – dictionary of give configs
  • file_name – path to config file(Default value = None)
kubeflow.fairing.frameworks.utils.scrub_fields(config, filed_names)

scrub fields in config

  • config – config spec
  • filed_names – name of fields
kubeflow.fairing.frameworks.utils.update_config_file(file_name, field_name, new_value)

update config file

  • file_name – file name
  • field_name – field name
  • new_value – new value to be added/updated
kubeflow.fairing.frameworks.utils.write_ip_list_file(file_name, ips, port=None)

write list of ips into a file

  • file_name – fine name
  • ips – list of ips
  • port – default port(Default value = None)

Module contents