diff --git a/demo-notebooks/additional-demos/hf_interactive.ipynb b/demo-notebooks/additional-demos/hf_interactive.ipynb index 45e9653fc..37216b5d5 100644 --- a/demo-notebooks/additional-demos/hf_interactive.ipynb +++ b/demo-notebooks/additional-demos/hf_interactive.ipynb @@ -42,8 +42,7 @@ "outputs": [], "source": [ "# Import pieces from codeflare-sdk\n", - "from codeflare_sdk.cluster.cluster import Cluster, ClusterConfiguration\n", - "from codeflare_sdk.cluster.auth import TokenAuthentication" + "from codeflare_sdk import Cluster, ClusterConfiguration, TokenAuthentication" ] }, { diff --git a/demo-notebooks/additional-demos/local_interactive.ipynb b/demo-notebooks/additional-demos/local_interactive.ipynb index b6773ee1a..674a655ea 100644 --- a/demo-notebooks/additional-demos/local_interactive.ipynb +++ b/demo-notebooks/additional-demos/local_interactive.ipynb @@ -10,8 +10,7 @@ "outputs": [], "source": [ "# Import pieces from codeflare-sdk\n", - "from codeflare_sdk.cluster.cluster import Cluster, ClusterConfiguration\n", - "from codeflare_sdk.cluster.auth import TokenAuthentication" + "from codeflare_sdk import Cluster, ClusterConfiguration, TokenAuthentication" ] }, { @@ -116,7 +115,7 @@ "metadata": {}, "outputs": [], "source": [ - "from codeflare_sdk.utils import generate_cert\n", + "from codeflare_sdk import generate_cert\n", "\n", "if local_interactive:\n", " generate_cert.generate_tls_cert(cluster_name, namespace)\n", diff --git a/demo-notebooks/guided-demos/0_basic_ray.ipynb b/demo-notebooks/guided-demos/0_basic_ray.ipynb index c905d1756..205f02175 100644 --- a/demo-notebooks/guided-demos/0_basic_ray.ipynb +++ b/demo-notebooks/guided-demos/0_basic_ray.ipynb @@ -19,8 +19,7 @@ "outputs": [], "source": [ "# Import pieces from codeflare-sdk\n", - "from codeflare_sdk.cluster.cluster import Cluster, ClusterConfiguration\n", - "from codeflare_sdk.cluster.auth import TokenAuthentication" + "from codeflare_sdk import Cluster, ClusterConfiguration, TokenAuthentication" ] }, { diff --git a/demo-notebooks/guided-demos/1_basic_instascale.ipynb b/demo-notebooks/guided-demos/1_basic_instascale.ipynb index f1795382e..418737eb6 100644 --- a/demo-notebooks/guided-demos/1_basic_instascale.ipynb +++ b/demo-notebooks/guided-demos/1_basic_instascale.ipynb @@ -16,8 +16,7 @@ "outputs": [], "source": [ "# Import pieces from codeflare-sdk\n", - "from codeflare_sdk.cluster.cluster import Cluster, ClusterConfiguration\n", - "from codeflare_sdk.cluster.auth import TokenAuthentication" + "from codeflare_sdk import Cluster, ClusterConfiguration, TokenAuthentication" ] }, { diff --git a/demo-notebooks/guided-demos/2_basic_jobs.ipynb b/demo-notebooks/guided-demos/2_basic_jobs.ipynb index 4b3cee910..e57a6ed8e 100644 --- a/demo-notebooks/guided-demos/2_basic_jobs.ipynb +++ b/demo-notebooks/guided-demos/2_basic_jobs.ipynb @@ -16,8 +16,7 @@ "outputs": [], "source": [ "# Import pieces from codeflare-sdk\n", - "from codeflare_sdk.cluster.cluster import Cluster, ClusterConfiguration\n", - "from codeflare_sdk.cluster.auth import TokenAuthentication" + "from codeflare_sdk import Cluster, ClusterConfiguration, TokenAuthentication" ] }, { @@ -108,7 +107,7 @@ "metadata": {}, "outputs": [], "source": [ - "from codeflare_sdk.job.jobs import DDPJobDefinition" + "from codeflare_sdk import DDPJobDefinition" ] }, { diff --git a/demo-notebooks/guided-demos/3_basic_interactive.ipynb b/demo-notebooks/guided-demos/3_basic_interactive.ipynb index bfcb2df3a..090a4a305 100644 --- a/demo-notebooks/guided-demos/3_basic_interactive.ipynb +++ b/demo-notebooks/guided-demos/3_basic_interactive.ipynb @@ -16,8 +16,7 @@ "outputs": [], "source": [ "# Import pieces from codeflare-sdk\n", - "from codeflare_sdk.cluster.cluster import Cluster, ClusterConfiguration\n", - "from codeflare_sdk.cluster.auth import TokenAuthentication" + "from codeflare_sdk import Cluster, ClusterConfiguration, TokenAuthentication" ] }, { diff --git a/demo-notebooks/guided-demos/4_gpt.ipynb b/demo-notebooks/guided-demos/4_gpt.ipynb index dba03bc4a..a4e1f366e 100644 --- a/demo-notebooks/guided-demos/4_gpt.ipynb +++ b/demo-notebooks/guided-demos/4_gpt.ipynb @@ -8,8 +8,7 @@ "outputs": [], "source": [ "# Import pieces from codeflare-sdk\n", - "from codeflare_sdk.cluster.cluster import Cluster, ClusterConfiguration\n", - "from codeflare_sdk.cluster.auth import TokenAuthentication" + "from codeflare_sdk import Cluster, ClusterConfiguration, TokenAuthentication" ] }, { @@ -98,7 +97,7 @@ "metadata": {}, "outputs": [], "source": [ - "from codeflare_sdk.job.jobs import DDPJobDefinition" + "from codeflare_sdk import DDPJobDefinition" ] }, { diff --git a/demo-notebooks/guided-demos/notebook-ex-outputs/0_basic_ray.ipynb b/demo-notebooks/guided-demos/notebook-ex-outputs/0_basic_ray.ipynb index d07fd4304..d8f6c34c4 100644 --- a/demo-notebooks/guided-demos/notebook-ex-outputs/0_basic_ray.ipynb +++ b/demo-notebooks/guided-demos/notebook-ex-outputs/0_basic_ray.ipynb @@ -19,8 +19,7 @@ "outputs": [], "source": [ "# Import pieces from codeflare-sdk\n", - "from codeflare_sdk.cluster.cluster import Cluster, ClusterConfiguration\n", - "from codeflare_sdk.cluster.auth import TokenAuthentication" + "from codeflare_sdk import Cluster, ClusterConfiguration, TokenAuthentication" ] }, { diff --git a/demo-notebooks/guided-demos/notebook-ex-outputs/1_basic_instascale.ipynb b/demo-notebooks/guided-demos/notebook-ex-outputs/1_basic_instascale.ipynb index 6cfe8143f..4b28b2058 100644 --- a/demo-notebooks/guided-demos/notebook-ex-outputs/1_basic_instascale.ipynb +++ b/demo-notebooks/guided-demos/notebook-ex-outputs/1_basic_instascale.ipynb @@ -16,8 +16,7 @@ "outputs": [], "source": [ "# Import pieces from codeflare-sdk\n", - "from codeflare_sdk.cluster.cluster import Cluster, ClusterConfiguration\n", - "from codeflare_sdk.cluster.auth import TokenAuthentication" + "from codeflare_sdk import Cluster, ClusterConfiguration, TokenAuthentication" ] }, { diff --git a/demo-notebooks/guided-demos/notebook-ex-outputs/2_basic_jobs.ipynb b/demo-notebooks/guided-demos/notebook-ex-outputs/2_basic_jobs.ipynb index 42600a3f0..166561779 100644 --- a/demo-notebooks/guided-demos/notebook-ex-outputs/2_basic_jobs.ipynb +++ b/demo-notebooks/guided-demos/notebook-ex-outputs/2_basic_jobs.ipynb @@ -16,8 +16,7 @@ "outputs": [], "source": [ "# Import pieces from codeflare-sdk\n", - "from codeflare_sdk.cluster.cluster import Cluster, ClusterConfiguration\n", - "from codeflare_sdk.cluster.auth import TokenAuthentication" + "from codeflare_sdk import Cluster, ClusterConfiguration, TokenAuthentication" ] }, { @@ -183,7 +182,7 @@ "metadata": {}, "outputs": [], "source": [ - "from codeflare_sdk.job.jobs import DDPJobDefinition" + "from codeflare_sdk import DDPJobDefinition" ] }, { diff --git a/demo-notebooks/guided-demos/notebook-ex-outputs/3_basic_interactive.ipynb b/demo-notebooks/guided-demos/notebook-ex-outputs/3_basic_interactive.ipynb index 974bd0587..7ac004706 100644 --- a/demo-notebooks/guided-demos/notebook-ex-outputs/3_basic_interactive.ipynb +++ b/demo-notebooks/guided-demos/notebook-ex-outputs/3_basic_interactive.ipynb @@ -16,8 +16,7 @@ "outputs": [], "source": [ "# Import pieces from codeflare-sdk\n", - "from codeflare_sdk.cluster.cluster import Cluster, ClusterConfiguration\n", - "from codeflare_sdk.cluster.auth import TokenAuthentication" + "from codeflare_sdk import Cluster, ClusterConfiguration, TokenAuthentication" ] }, { diff --git a/demo-notebooks/guided-demos/notebook-ex-outputs/4_gpt.ipynb b/demo-notebooks/guided-demos/notebook-ex-outputs/4_gpt.ipynb index 4ed6cc54a..3f8afa35d 100644 --- a/demo-notebooks/guided-demos/notebook-ex-outputs/4_gpt.ipynb +++ b/demo-notebooks/guided-demos/notebook-ex-outputs/4_gpt.ipynb @@ -8,8 +8,7 @@ "outputs": [], "source": [ "# Import pieces from codeflare-sdk\n", - "from codeflare_sdk.cluster.cluster import Cluster, ClusterConfiguration\n", - "from codeflare_sdk.cluster.auth import TokenAuthentication" + "from codeflare_sdk import Cluster, ClusterConfiguration, TokenAuthentication" ] }, { @@ -174,7 +173,7 @@ "metadata": {}, "outputs": [], "source": [ - "from codeflare_sdk.job.jobs import DDPJobDefinition" + "from codeflare_sdk import DDPJobDefinition" ] }, { diff --git a/demo-notebooks/guided-demos/preview_nbs/0_basic_ray.ipynb b/demo-notebooks/guided-demos/preview_nbs/0_basic_ray.ipynb index be2ca1e56..b0f12d4ba 100644 --- a/demo-notebooks/guided-demos/preview_nbs/0_basic_ray.ipynb +++ b/demo-notebooks/guided-demos/preview_nbs/0_basic_ray.ipynb @@ -19,8 +19,7 @@ "outputs": [], "source": [ "# Import pieces from codeflare-sdk\n", - "from codeflare_sdk.cluster.cluster import Cluster, ClusterConfiguration\n", - "from codeflare_sdk.cluster.auth import TokenAuthentication" + "from codeflare_sdk import Cluster, ClusterConfiguration, TokenAuthentication" ] }, { diff --git a/demo-notebooks/guided-demos/preview_nbs/1_basic_instascale.ipynb b/demo-notebooks/guided-demos/preview_nbs/1_basic_instascale.ipynb index f1795382e..418737eb6 100644 --- a/demo-notebooks/guided-demos/preview_nbs/1_basic_instascale.ipynb +++ b/demo-notebooks/guided-demos/preview_nbs/1_basic_instascale.ipynb @@ -16,8 +16,7 @@ "outputs": [], "source": [ "# Import pieces from codeflare-sdk\n", - "from codeflare_sdk.cluster.cluster import Cluster, ClusterConfiguration\n", - "from codeflare_sdk.cluster.auth import TokenAuthentication" + "from codeflare_sdk import Cluster, ClusterConfiguration, TokenAuthentication" ] }, { diff --git a/demo-notebooks/guided-demos/preview_nbs/2_basic_jobs.ipynb b/demo-notebooks/guided-demos/preview_nbs/2_basic_jobs.ipynb index e3bbbce95..495a0855c 100644 --- a/demo-notebooks/guided-demos/preview_nbs/2_basic_jobs.ipynb +++ b/demo-notebooks/guided-demos/preview_nbs/2_basic_jobs.ipynb @@ -16,8 +16,7 @@ "outputs": [], "source": [ "# Import pieces from codeflare-sdk\n", - "from codeflare_sdk.cluster.cluster import Cluster, ClusterConfiguration\n", - "from codeflare_sdk.cluster.auth import TokenAuthentication" + "from codeflare_sdk import Cluster, ClusterConfiguration, TokenAuthentication" ] }, { @@ -108,7 +107,7 @@ "metadata": {}, "outputs": [], "source": [ - "from codeflare_sdk.job.jobs import DDPJobDefinition" + "from codeflare_sdk import DDPJobDefinition" ] }, { diff --git a/demo-notebooks/guided-demos/preview_nbs/3_basic_interactive.ipynb b/demo-notebooks/guided-demos/preview_nbs/3_basic_interactive.ipynb index bfcb2df3a..090a4a305 100644 --- a/demo-notebooks/guided-demos/preview_nbs/3_basic_interactive.ipynb +++ b/demo-notebooks/guided-demos/preview_nbs/3_basic_interactive.ipynb @@ -16,8 +16,7 @@ "outputs": [], "source": [ "# Import pieces from codeflare-sdk\n", - "from codeflare_sdk.cluster.cluster import Cluster, ClusterConfiguration\n", - "from codeflare_sdk.cluster.auth import TokenAuthentication" + "from codeflare_sdk import Cluster, ClusterConfiguration, TokenAuthentication" ] }, { diff --git a/demo-notebooks/guided-demos/preview_nbs/4_gpt.ipynb b/demo-notebooks/guided-demos/preview_nbs/4_gpt.ipynb index 77edf5911..e0407e8c4 100644 --- a/demo-notebooks/guided-demos/preview_nbs/4_gpt.ipynb +++ b/demo-notebooks/guided-demos/preview_nbs/4_gpt.ipynb @@ -8,8 +8,7 @@ "outputs": [], "source": [ "# Import pieces from codeflare-sdk\n", - "from codeflare_sdk.cluster.cluster import Cluster, ClusterConfiguration\n", - "from codeflare_sdk.cluster.auth import TokenAuthentication" + "from codeflare_sdk import Cluster, ClusterConfiguration, TokenAuthentication" ] }, { @@ -98,7 +97,7 @@ "metadata": {}, "outputs": [], "source": [ - "from codeflare_sdk.job.jobs import DDPJobDefinition" + "from codeflare_sdk import DDPJobDefinition" ] }, { diff --git a/docs/authentication.md b/docs/authentication.md index 20dd44528..8812a6fc0 100644 --- a/docs/authentication.md +++ b/docs/authentication.md @@ -5,7 +5,7 @@ Authenticating with your cluster allows you to perform actions such as creating ## Method 1 Token Authentication This is how a typical user would authenticate to their cluster using `TokenAuthentication`. ``` -from codeflare_sdk.cluster.auth import TokenAuthentication +from codeflare_sdk import TokenAuthentication auth = TokenAuthentication( token = "XXXXX", @@ -27,7 +27,7 @@ If the user has not specifically authenticated through the SDK by other means su A user can specify a config file via a different authentication class `KubeConfigFileAuthentication` for authenticating with the SDK.
This is what loading a custom config file would typically look like. ``` -from codeflare_sdk.cluster.auth import KubeConfigFileAuthentication +from codeflare_sdk import KubeConfigFileAuthentication auth = KubeConfigFileAuthentication( kube_config_path="/path/to/config", diff --git a/docs/cluster-configuration.md b/docs/cluster-configuration.md index 2ad614a68..bb058fa4e 100644 --- a/docs/cluster-configuration.md +++ b/docs/cluster-configuration.md @@ -4,7 +4,7 @@ To create Ray Clusters using the CodeFlare SDK a cluster configuration needs to This is what a typical cluster configuration would look like; Note: The values for CPU and Memory are at the minimum requirements for creating the Ray Cluster. ``` -from codeflare_sdk.cluster.cluster import Cluster, ClusterConfiguration +from codeflare_sdk import Cluster, ClusterConfiguration cluster = Cluster(ClusterConfiguration( name='ray-example', # Mandatory Field