Archived
rad-convert: clef needs --arch clef, refused otherwise
This commit is contained in:
1 parent
0b756e64f8
commit
65a9e78acf
2 files changed
+15
No files matched your search
@@ -393,6 +393,13 @@ TEST(a_clef_convert_without_the_head_is_refused) {
|
|||||||
"--set", "decision.type=clef" }, engine_env(), &log, 300);
|
"--set", "decision.type=clef" }, engine_env(), &log, 300);
|
||||||
CHECK(st != 0);
|
CHECK(st != 0);
|
||||||
CHECK(log.find("joint_head.safetensors") != std::string::npos);
|
CHECK(log.find("joint_head.safetensors") != std::string::npos);
|
||||||
|
/* And one that keeps the qwen35 id: the head would never run, so the convert refuses it. */
|
||||||
|
log.clear();
|
||||||
|
const int st2 = tiny::run({ RAD_E2E_CONVERT, ck, "-o", dir / "no-arch.rad", "--add",
|
||||||
|
ck + "/joint_head.safetensors", "--set", "decision.type=clef" },
|
||||||
|
engine_env(), &log, 300);
|
||||||
|
CHECK(st2 != 0);
|
||||||
|
CHECK(log.find("--arch clef") != std::string::npos);
|
||||||
}
|
}
|
||||||
|
|
||||||
RAD_TEST_MAIN()
|
RAD_TEST_MAIN()
|
||||||
@@ -58,6 +58,14 @@ bool file_exists(const std::string& p) { std::ifstream f(p); return (bool)f; }
|
|||||||
* (arch/common/rad_block_clef.h) and the server applies the scalars (core/server/clef.h). */
|
* (arch/common/rad_block_clef.h) and the server applies the scalars (core/server/clef.h). */
|
||||||
int clef_metadata(const std::string& in, const std::string& config_dir, const Checkpoint& ck,
|
int clef_metadata(const std::string& in, const std::string& config_dir, const Checkpoint& ck,
|
||||||
MetaOwn& meta) {
|
MetaOwn& meta) {
|
||||||
|
/* The head lives in the clef plugins, selected by the architecture id. A container that
|
||||||
|
* says decision.type=clef but keeps its qwen35 id would load the trunk alone and answer
|
||||||
|
* /v1/systemone from a head that never ran. */
|
||||||
|
if (meta.arch != "clef") {
|
||||||
|
RAD_ERR("%s: decision.type=clef needs the clef plugins: convert with --arch clef (the "
|
||||||
|
"container's architecture is '%s')", in.c_str(), meta.arch.c_str());
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
std::string dir = config_dir;
|
std::string dir = config_dir;
|
||||||
if (dir.empty()) {
|
if (dir.empty()) {
|
||||||
struct stat st{};
|
struct stat st{};
|
||||||
|
|||||||
Reference in new issue
Block a user