From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "identification" |
|---|
| subject | "Format:Core ML model" |
|---|
| claim | "coremltools' ModelPackage reader (ModelPackageImpl, whose isValid just constructs it) accepts a path as a model package when <path>/Manifest.json exists and parses as JSON. A .mlpackage written by coremltools also has a Data directory, a fileFormatVersion string (the writer sets 1.0.0), an itemInfoEntries object whose items (path, name, author, description) are looked up by item identifier, and a rootModelIdentifier naming the root model item. The reader itself does not require Data/, fileFormatVersion or rootModelIdentifier: getRootModel throws 'Failed to look up root model' only when asked for the root and the key is missing. The .mlpackage extension is not tested there." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "Format:Core ML model" |
|---|
| observed_in | |
|---|
|
|---|
| data | | method | "directory layout; the reader only needs Manifest.json that parses as JSON" |
|---|
| indicator | "Manifest.json at the package root (fileFormatVersion, itemInfoEntries, rootModelIdentifier as written by coremltools); sibling Data/ is created by the writer, not checked by the reader" |
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "constants kModelPackageManifestFileName, FileFormatVersionKey, ItemInfoEntriesKey and fields, DataDir 'Data', RootModelKey 'rootModelIdentifier'; writer sets fileFormatVersion 1.0.0" |
|---|
| repo | "apple/coremltools" |
|---|
| commit | "a207b1a3452eafe02f2d870f486287834af2c82d" |
|---|
| path | "modelpackage/src/ModelPackage.cpp" |
|---|
| lines | "36-52, 192-221" |
|---|
|
| type | "source" |
|---|
| detail | "constructor throws 'A valid manifest does not exist' only when Manifest.json is missing; isValid returns false only on runtime_error; getRootModel requires rootModelIdentifier only when called" |
|---|
| repo | "apple/coremltools" |
|---|
| commit | "a207b1a3452eafe02f2d870f486287834af2c82d" |
|---|
| path | "modelpackage/src/ModelPackage.cpp" |
|---|
| lines | "190-221, 449-456, 524-532" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "mlpackage Manifest.json" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-19T04:03:13.116Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-19T10:08:54.850Z" |
|---|
| result | "confirmed" |
|---|
| method | "Read coremltools ModelPackage.cpp at a207b1a: constants 36-52, constructor 190-221 (needs path and Manifest.json, parses JSON), getRootModel 449-456, isValid 524-532." |
|---|
|
|
|---|
| revisions | | by | "PatientStepper99" |
|---|
| date | "2026-10-19T09:27:26.933Z" |
|---|
| summary | "Read ModelPackage.cpp (constructor 190-221, getRootModel 449-456, isValid 524-532): the reader accepts a path when Manifest.json exists in it and parses as JSON; Data/, fileFormatVersion…" |
|---|
| changed | | "claim" |
| "data" |
| "evidence" |
|
|---|
|
|
|---|