Do not compile MLModel in Swift Package Bundle

Hello,

I want to add a .mlmodel to my swift package to have a test to verify that the compilation is working.

targets: [
    .target(
      name: "packageName",
      dependencies: ["package1"]
    ),
    .testTarget(
      name: "packageNameTests",
      dependencies: ["packageName"],
      resources: [
        .copy("Resources/testmodel.mlmodel"),
      ]
    )
  ]

My problem is the .mlmodel is always as a compiled model after bundling

let docsPath = Bundle.module.resourcePath!
let docsArray = try fileManager.contentsOfDirectory(atPath: docsPath)
    print(docsArray)

leads to ["testmodel.mlmodelc"]

I am excepting testmodel.mlmodel to be present instead. I find it strange that copy is processing the ressource. Is there a workaround ? I am using Xcode 14 beta but there is a similar post on StackOverflow without answer regarding this issue https://stackoverflow.com/questions/64298356/how-to-add-uncompiled-mlmodel-to-xcode-unittests-bundle that got this problem with Xcode 12

Thank you

Do not compile MLModel in Swift Package Bundle
 
 
Q