Files
wehub-resource-sync 311a3666c4
Build documentation / build (push) Failing after 0s
Unit tests / build (18) (push) Has been cancelled
Unit tests / build (20) (push) Has been cancelled
Unit tests / build (22) (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:44:39 +08:00

24 lines
615 B
JavaScript

import { AutoConfig, env } from "../src/transformers.js";
import { getFile } from "../src/utils/hub.js";
// Initialise the testing environment
env.allowLocalModels = false;
env.useFSCache = false;
const TEST_DATA = {
"Xenova/bert-base-uncased": {
model_type: "bert",
},
};
describe("Configs", () => {
for (const [model_id, minimal_config] of Object.entries(TEST_DATA)) {
it(model_id, async () => {
const config = await AutoConfig.from_pretrained(model_id);
for (const [key, value] of Object.entries(minimal_config)) {
expect(config[key]).toEqual(value);
}
});
}
});