fix some bugs

This commit is contained in:
yuze.zyz
2024-10-29 17:23:56 +08:00
parent 3762ba3318
commit d45a584ef5
3 changed files with 7 additions and 4 deletions

View File

@@ -46,7 +46,7 @@ RUN cd /tmp && GIT_LFS_SKIP_SMUDGE=1 git clone -b {swift_branch} --single-branc
RUN pip install --no-cache-dir torch=={torch_version} torchvision=={torchvision_version} torchaudio=={torchaudio_version} {index_url}
RUN pip install --no-cache-dir transformers -U
RUN pip install --no-cache-dir transformers -U huggingface-hub==0.25.0
RUN pip config set global.index-url https://mirrors.aliyun.com/pypi/simple && \
pip config set install.trusted-host mirrors.aliyun.com && \
@@ -56,4 +56,4 @@ ENV SETUPTOOLS_USE_DISTUTILS=stdlib
ENV VLLM_USE_MODELSCOPE=True
ENV LMDEPLOY_USE_MODELSCOPE=True
ENV MODELSCOPE_CACHE=/mnt/workspace/.cache/modelscope
CMD ["bash"]
ENTRYPOINT ["/bin/bash"]

View File

@@ -481,7 +481,10 @@ class DistributedPipeline(Pipeline):
def __del__(self):
if hasattr(self, 'model_pool') and self.model_pool is not None:
self.model_pool.terminate()
try:
self.model_pool.terminate()
except AttributeError:
pass
def __getstate__(self):
self_dict = self.__dict__.copy()

View File

@@ -17,7 +17,7 @@ sacremoses>=0.0.41
scikit_learn
sentencepiece
seqeval
spacy>=2.3.5
spacy>=2.3.5,<=3.7.0
stanza
subword_nmt>=0.3.8
termcolor