Skip to content

Commit 7c03cb4

Browse files
committed
updated the KatibClient constructor to match the TrainingClient constructor
Signed-off-by: tariq-hasan <[email protected]>
1 parent a817171 commit 7c03cb4

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

sdk/python/v1beta1/kubeflow/katib/api/katib_client.py

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,21 +34,29 @@
3434
class KatibClient(object):
3535
def __init__(
3636
self,
37-
config_file: str = None,
38-
context: str = None,
39-
client_configuration: client.Configuration = None,
37+
config_file: Optional[str] = None,
38+
context: Optional[str] = None,
39+
client_configuration: Optional[client.Configuration] = None,
4040
namespace: str = utils.get_default_target_namespace(),
4141
):
42-
"""KatibClient constructor.
42+
"""KatibClient constructor. Configure logging in your application
43+
as follows to see detailed information from the KatibClient APIs:
44+
.. code-block:: python
45+
import logging
46+
logging.basicConfig()
47+
log = logging.getLogger("kubeflow.katib.api.katib_client")
48+
log.setLevel(logging.DEBUG)
4349
4450
Args:
4551
config_file: Path to the kube-config file. Defaults to ~/.kube/config.
4652
context: Set the active context. Defaults to current_context from the kube-config.
4753
client_configuration: Client configuration for cluster authentication.
4854
You have to provide valid configuration with Bearer token or
49-
with username and password.
50-
You can find an example here: https://github.com/kubernetes-client/python/blob/67f9c7a97081b4526470cad53576bc3b71fa6fcc/examples/remote_cluster.py#L31
51-
namespace: Target Kubernetes namespace. Can be overridden during method invocations.
55+
with username and password. You can find an example here:
56+
https://github.com/kubernetes-client/python/blob/67f9c7a97081b4526470cad53576bc3b71fa6fcc/examples/remote_cluster.py#L31
57+
namespace: Target Kubernetes namespace. By default it takes namespace
58+
from `/var/run/secrets/kubernetes.io/serviceaccount/namespace` location
59+
or set as `default`. Namespace can be overridden during method invocations.
5260
"""
5361

5462
self.in_cluster = False

0 commit comments

Comments
 (0)