@@ -2067,14 +2067,20 @@ def test_hf_model_urls_are_valid(self, model_name):
20672067 HF_MODELS entry return HTTP 200 status codes.
20682068 """
20692069 config = HF_MODELS [model_name ]
2070- # URL validation happens in __post_init__, so if we get here without
2071- # an exception, the URLs are valid. But let's also verify the config
2072- # has the expected URLs set.
2073- print (f"Validating URLs for model: { model_name } " )
2070+
2071+ # Verify config has URLs set
20742072 assert config .model_url is not None , f"{ model_name } should have model_url"
20752073 assert (
20762074 config .tokenizer_url is not None
20772075 ), f"{ model_name } should have tokenizer_url"
2078- assert (
2079- config .validate_urls is True
2080- ), f"{ model_name } should have validate_urls=True"
2076+
2077+ # Explicitly validate URLs by creating a new config with validation enabled
2078+ # (HF_MODELS uses validate_urls=False by default for fast import)
2079+ print (f"Validating URLs for model: { model_name } " )
2080+ ModelConfig (
2081+ model_id = config .model_id ,
2082+ embedding_dim = config .embedding_dim ,
2083+ model_url = config .model_url ,
2084+ tokenizer_url = config .tokenizer_url ,
2085+ validate_urls = True , # Explicitly enable validation
2086+ )
0 commit comments