From e1d697d2560c5ad9c8a5951f2e5ebe23a294b2ad Mon Sep 17 00:00:00 2001 From: edknv Date: Fri, 12 Jan 2024 22:46:07 -0800 Subject: [PATCH] lint --- crossfit/op/base.py | 3 +-- crossfit/op/tokenize.py | 2 +- docker/ci/build_and_push.sh | 20 ++++++++++---------- 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/crossfit/op/base.py b/crossfit/op/base.py index c5f712b..5a564f6 100644 --- a/crossfit/op/base.py +++ b/crossfit/op/base.py @@ -13,7 +13,6 @@ # limitations under the License. import inspect -import uuid import dask.dataframe as dd from dask.distributed import get_worker, wait @@ -81,7 +80,7 @@ def __call__(self, data, *args, partition_info=None, **kwargs): self.teardown() return output - #self.setup() + # self.setup() if self.pre is not None: params = inspect.signature(self.pre).parameters diff --git a/crossfit/op/tokenize.py b/crossfit/op/tokenize.py index 30bc7a0..686ece6 100644 --- a/crossfit/op/tokenize.py +++ b/crossfit/op/tokenize.py @@ -45,7 +45,7 @@ def tokenize_strings(self, sentences, max_length=None): worker = self.get_worker() if hasattr(worker, "tokenizer"): - tokernizer = worker.tokenizer + tokenizer = worker.tokenizer else: tokenizer = GPUTokenizer.from_pretrained(self.model) worker.tokenizer = tokenizer diff --git a/docker/ci/build_and_push.sh b/docker/ci/build_and_push.sh index a966d1c..ae7b9ae 100755 --- a/docker/ci/build_and_push.sh +++ b/docker/ci/build_and_push.sh @@ -10,13 +10,13 @@ IMAGE_TAG=23.10 docker build -t ${IMAGE_NAME}:${IMAGE_TAG} -f docker/ci/Dockerfile . -#if [ -z ${NVCR_PAT+x} ] -#then -# echo "This script assumes your nvcr personal access token is stored in " -# echo "a variable named NVCR_PAT, e.g., export NVCR_PAT=YOUR_TOKEN. " -# exit 1 -#fi -# -#echo ${NVCR_PAT} | docker login nvcr.io -u '$oauthtoken' --password-stdin -# -#docker push ${IMAGE_NAME}:${IMAGE_TAG} +if [ -z ${NVCR_PAT+x} ] +then + echo "This script assumes your nvcr personal access token is stored in " + echo "a variable named NVCR_PAT, e.g., export NVCR_PAT=YOUR_TOKEN. " + exit 1 +fi + +echo ${NVCR_PAT} | docker login nvcr.io -u '$oauthtoken' --password-stdin + +docker push ${IMAGE_NAME}:${IMAGE_TAG}