[BUG]  module 'signal' has no attribute 'SIGALRM
Labels: name: area: embeddings, name: auto:bug

### System Info

```py

In [21]: langchain.__version__
Out[21]: '0.0.223'

In [24]: sys.platform
Out[24]: 'win32'

In [25]: !python -V
Python 3.10.10
```

### Who can help?

_No response_

### Information

- [ ] The official example notebooks/scripts
- [x] My own modified scripts

### Related Components

- [ ] LLMs/Chat Models
- [x] Embedding Models
- [ ] Prompts / Prompt Templates / Prompt Selectors
- [ ] Output Parsers
- [ ] Document Loaders
- [ ] Vector Stores / Retrievers
- [ ] Memory
- [ ] Agents / Agent Executors
- [ ] Tools / Toolkits
- [ ] Chains
- [ ] Callbacks/Tracing
- [ ] Async

### Reproduction

```py
In [18]: from langchain.embeddings.huggingface import HuggingFaceEmbeddings

In [19]: model = HuggingFaceEmbeddings(model_name='d:/src/chatglm2-6b-int4/')
No sentence-transformers model found with name d:/src/chatglm2-6b-int4/. Creating a new one with MEAN pooling.
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
Cell In[19], line 1
----> 1 model = HuggingFaceEmbeddings(model_name='d:/src/chatglm2-6b-int4/')

File D:\Python310\lib\site-packages\langchain\embeddings\huggingface.py:59, in HuggingFaceEmbeddings.__init__(self, **kwargs)
     53 except ImportError as exc:
     54     raise ImportError(
     55         "Could not import sentence_transformers python package. "
     56         "Please install it with `pip install sentence_transformers`."
     57     ) from exc
---> 59 self.client = sentence_transformers.SentenceTransformer(
     60     self.model_name, cache_folder=self.cache_folder, **self.model_kwargs
     61 )

File D:\Python310\lib\site-packages\sentence_transformers\SentenceTransformer.py:97, in SentenceTransformer.__init__(self, model_name_or_path, modules, device, cache_folder, use_auth_token)
     95         modules = self._load_sbert_model(model_path)
     96     else:   #Load with AutoModel
---> 97         modules = self._load_auto_model(model_path)
     99 if modules is not None and not isinstance(modules, OrderedDict):
    100     modules = OrderedDict([(str(idx), module) for idx, module in enumerate(modules)])

File D:\Python310\lib\site-packages\sentence_transformers\SentenceTransformer.py:806, in SentenceTransformer._load_auto_model(self, model_name_or_path)
    802 """
    803 Creates a simple Transformer + Mean Pooling model and returns the modules
    804 """
    805 logger.warning("No sentence-transformers model found with name {}. Creating a new one with MEAN pooling.".format(model_name_or_path))
--> 806 transformer_model = Transformer(model_name_or_path)
    807 pooling_model = Pooling(transformer_model.get_word_embedding_dimension(), 'mean')
    808 return [transformer_model, pooling_model]

File D:\Python310\lib\site-packages\sentence_transformers\models\Transformer.py:28, in Transformer.__init__(self, model_name_or_path, max_seq_length, model_args, cache_dir, tokenizer_args, do_lower_case, tokenizer_name_or_path)
     25 self.config_keys = ['max_seq_length', 'do_lower_case']
     26 self.do_lower_case = do_lower_case
---> 28 config = AutoConfig.from_pretrained(model_name_or_path, **model_args, cache_dir=cache_dir)
     29 self._load_model(model_name_or_path, config, cache_dir)
     31 self.tokenizer = AutoTokenizer.from_pretrained(tokenizer_name_or_path if tokenizer_name_or_path is not None else model_name_or_path, cache_dir=cache_dir, **tokenizer_args)

File D:\Python310\lib\site-packages\transformers\models\auto\configuration_auto.py:986, in AutoConfig.from_pretrained(cls, pretrained_model_name_or_path, **kwargs)
    984 has_remote_code = "auto_map" in config_dict and "AutoConfig" in config_dict["auto_map"]
    985 has_local_code = "model_type" in config_dict and config_dict["model_type"] in CONFIG_MAPPING
--> 986 trust_remote_code = resolve_trust_remote_code(
    987     trust_remote_code, pretrained_model_name_or_path, has_local_code, has_remote_code
    988 )
    990 if has_remote_code and trust_remote_code:
    991     class_ref = config_dict["auto_map"]["AutoConfig"]

File D:\Python310\lib\site-packages\transformers\dynamic_module_utils.py:535, in resolve_trust_remote_code(trust_remote_code, model_name, has_local_code, has_remote_code)
    533     trust_remote_code = False
    534 elif has_remote_code and TIME_OUT_REMOTE_CODE > 0:
--> 535     signal.signal(signal.SIGALRM, _raise_timeout_error)
    536     signal.alarm(TIME_OUT_REMOTE_CODE)
    537     while trust_remote_code is None:

AttributeError: module 'signal' has no attribute 'SIGALRM'
```

### Expected behavior

load successfully

This is a signal not supported in windows, so it's shouldn't be depended.