Skip to content

Commit

Permalink
fix dependencies format
Browse files Browse the repository at this point in the history
  • Loading branch information
oeway authored Nov 6, 2024
1 parent 44c7347 commit 123f916
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/bioimageio-packager.imjoy.html
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,15 @@
}
exportSpec.weights[weightsFormat].architecture = wformat.architecture
}
if(wformat.dependencies && wformat.dependencies.includes(':')){
const dep = wformat.dependencies.split(':').slice(1).join(":") // e.g. pip:./requirements.txt
files.push(dep)
if(wformat.dependencies){
if(typeof wformat.dependencies === 'string'){
const dep = wformat.dependencies.split(':').slice(1).join(":") // e.g. pip:./requirements.txt
files.push(dep)
}
else {
const dep = wformat.dependencies.source.split(':').slice(1).join(":") // e.g. pip:./requirements.txt
files.push(dep)
}
exportSpec.weights[weightsFormat].dependencies = wformat.dependencies
}
}
Expand Down

0 comments on commit 123f916

Please sign in to comment.