Skip to content

Commit

Permalink
Merge branch 'master' into wyen/fix_pg_update
Browse files Browse the repository at this point in the history
  • Loading branch information
ckyuto authored Apr 26, 2024
2 parents 8f4b2e4 + f8f7363 commit c8d7650
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 20 deletions.
8 changes: 4 additions & 4 deletions examples/pytorch/language-modeling/train_api_hf_dataset.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
"from kubeflow.storage_initializer.s3 import S3DatasetParams\n",
"from kubeflow.storage_initializer.hugging_face import (\n",
" HuggingFaceModelParams,\n",
" HuggingFaceTrainParams,\n",
" HfDatasetParams,\n",
" HuggingFaceTrainerParams,\n",
" HuggingFaceDatasetParams,\n",
")\n",
"from kubeflow.storage_initializer.constants import INIT_CONTAINER_MOUNT_PATH\n",
"from peft import LoraConfig\n",
Expand Down Expand Up @@ -70,8 +70,8 @@
" ),\n",
" # it is assumed for text related tasks, you have 'text' column in the dataset.\n",
" # for more info on how dataset is loaded check load_and_preprocess_data function in sdk/python/kubeflow/trainer/hf_llm_training.py\n",
" dataset_provider_parameters=HfDatasetParams(repo_id=\"imdatta0/ultrachat_1k\"),\n",
" train_parameters=HuggingFaceTrainParams(\n",
" dataset_provider_parameters=HuggingFaceDatasetParams(repo_id=\"imdatta0/ultrachat_1k\"),\n",
" trainer_parameters=HuggingFaceTrainerParams(\n",
" lora_config=LoraConfig(\n",
" r=8,\n",
" lora_alpha=8,\n",
Expand Down
20 changes: 9 additions & 11 deletions examples/pytorch/language-modeling/train_api_s3_dataset.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
"from kubeflow.training.api.training_client import TrainingClient\n",
"from kubeflow.storage_initializer.hugging_face import (\n",
" HuggingFaceModelParams,\n",
" HuggingFaceTrainParams,\n",
" HfDatasetParams,\n",
" HuggingFaceTrainerParams,\n",
")\n",
"from kubeflow.storage_initializer.s3 import S3DatasetParams\n",
"from kubeflow.storage_initializer.constants import INIT_CONTAINER_MOUNT_PATH\n",
"from peft import LoraConfig\n",
"import transformers\n",
Expand Down Expand Up @@ -81,16 +81,14 @@
" # it is assumed for text related tasks, you have 'text' column in the dataset.\n",
" # for more info on how dataset is loaded check load_and_preprocess_data function in sdk/python/kubeflow/trainer/hf_llm_training.py\n",
" dataset_provider_parameters=S3DatasetParams(\n",
" {\n",
" \"endpoint_url\": \"http://10.117.63.3\",\n",
" \"bucket_name\": \"test\",\n",
" \"file_key\": \"imdatta0___ultrachat_1k\",\n",
" \"region_name\": \"us-east-1\",\n",
" \"access_key\": s3_access_key,\n",
" \"secret_key\": s3_secret_key,\n",
" }\n",
" endpoint_url=\"http://10.117.63.3\",\n",
" bucket_name=\"test\",\n",
" file_key=\"imdatta0___ultrachat_1k\",\n",
" region_name=\"us-east-1\",\n",
" access_key=s3_access_key,\n",
" secret_key=s3_secret_key,\n",
" ),\n",
" train_parameters=HuggingFaceTrainParams(\n",
" trainer_parameters=HuggingFaceTrainerParams(\n",
" lora_config=LoraConfig(\n",
" r=8,\n",
" lora_alpha=8,\n",
Expand Down
8 changes: 4 additions & 4 deletions examples/pytorch/text-classification/Fine-Tune-BERT-LLM.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -613,8 +613,8 @@
"from kubeflow.training import TrainingClient\n",
"from kubeflow.storage_initializer.hugging_face import (\n",
" HuggingFaceModelParams,\n",
" HuggingFaceTrainParams,\n",
" HfDatasetParams,\n",
" HuggingFaceTrainerParams,\n",
" HuggingFaceDatasetParams,\n",
")\n",
"\n",
"import transformers\n",
Expand Down Expand Up @@ -646,12 +646,12 @@
" \"access_modes\": [\"ReadWriteOnce\"] # Since we use 1 Worker, PVC access mode is ReadWriteOnce.\n",
" },\n",
" # Use 3000 samples from Yelp dataset.\n",
" dataset_provider_parameters=HfDatasetParams(\n",
" dataset_provider_parameters=HuggingFaceDatasetParams(\n",
" repo_id=\"yelp_review_full\",\n",
" split=\"train[:3000]\",\n",
" ),\n",
" # Specify HuggingFace Trainer parameters. In this example, we will skip evaluation and model checkpoints.\n",
" train_parameters=HuggingFaceTrainParams(\n",
" trainer_parameters=HuggingFaceTrainerParams(\n",
" training_parameters=transformers.TrainingArguments(\n",
" output_dir=\"test_trainer\",\n",
" save_strategy=\"no\",\n",
Expand Down
1 change: 0 additions & 1 deletion pkg/controller.v1/common/scheduling.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ package common

import (
"fmt"

log "github.com/sirupsen/logrus"
k8serrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down

0 comments on commit c8d7650

Please sign in to comment.