New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

orchestrator-core

Package Overview
Dependencies
Maintainers
1
Versions
100
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

orchestrator-core - npm Package Compare versions

Comparing version 4.11.2-dev.20201208.c620747 to 4.11.2-dev.20210112.a4baa98

5

package.json

@@ -5,3 +5,3 @@ {

"description": "Orchestrator for Node.js",
"version": "4.11.2-dev.20201208.c620747",
"version": "4.11.2-dev.20210112.a4baa98",
"license": "MIT",

@@ -27,4 +27,3 @@ "keywords": [

"node-gyp": "^7.1.2",
"node-pre-gyp": "^0.15.0",
"onnxruntime": "1.4.0"
"node-pre-gyp": "^0.15.0"
},

@@ -31,0 +30,0 @@ "binary": {

23

tests/oc.test.js

@@ -11,3 +11,3 @@ // Copyright (c) Microsoft Corporation. All rights reserved.

// Begins looking "path_depth" directories from current directory.
var findOnnxDir = function(path_depth) {
var findOnnxDir = function(path_depth, baseModelName='pretrained.20200924.microsoft.dte.00.06.en.onnx') {
var cwd = process.cwd();

@@ -24,3 +24,3 @@ var i;

var model_dir = null;
function validateConfigFile(model_dir) {
function validateConfigFile(model_dir, baseModelName) {
// console.log('ONNX: Found onnx file in ' + model_dir);

@@ -35,5 +35,6 @@ try{

const config = JSON.parse(jsonData);
if (config.hasOwnProperty('VocabFile') && config.hasOwnProperty('MergeFile')
&& config.hasOwnProperty('ModelFile') && config.hasOwnProperty('Name')) {
// console.log(' => VALID!');
if (config.hasOwnProperty('VocabFile')
&& config.hasOwnProperty('ModelFile') && config.hasOwnProperty('Name')
&& config.Name == baseModelName) {
// console.log(' => VALID! Found model ' + baseModelName);
return true;

@@ -53,4 +54,3 @@ }

function findModel(cwd) {
function findModel(cwd, baseModelName) {
fs.readdirSync(cwd).find( (dirInner) => {

@@ -63,3 +63,3 @@ dirInner = cwd + sep + dirInner;

!dirInner.endsWith("TestResults")) { // Don't bother looking in TestResults
return findModel(dirInner);
return findModel(dirInner, baseModelName);
}

@@ -71,3 +71,3 @@

dirInner = dtemp.join(sep);
if (validateConfigFile(dirInner)) {
if (validateConfigFile(dirInner, baseModelName)) {
model_dir = dirInner;

@@ -82,3 +82,4 @@ return true;

}
findModel(cwd);
findModel(cwd, baseModelName);
return model_dir;

@@ -94,3 +95,3 @@ };

this.orchestrator = new oc.Orchestrator();
var onnx_dir = findOnnxDir(1);
var onnx_dir = findOnnxDir(1, );
console.log(`DEBUGGING - nodejs - orchestrator-core: Orchestrator.before(): onnx_dir=${onnx_dir}`);

@@ -97,0 +98,0 @@ fs.readdirSync(onnx_dir).forEach(file => {

@@ -11,3 +11,3 @@ // Copyright (c) Microsoft Corporation. All rights reserved.

// Begins looking "path_depth" directories from current directory.
var findOnnxDir = function(path_depth) {
var findOnnxDir = function(path_depth, baseModelName='pretrained.20200924.microsoft.dte.00.06.en.onnx') {
var cwd = process.cwd();

@@ -24,3 +24,3 @@ var i;

var model_dir = null;
function validateConfigFile(model_dir) {
function validateConfigFile(model_dir, baseModelName) {
// console.log('ONNX: Found onnx file in ' + model_dir);

@@ -35,5 +35,6 @@ try{

const config = JSON.parse(jsonData);
if (config.hasOwnProperty('VocabFile') && config.hasOwnProperty('MergeFile')
&& config.hasOwnProperty('ModelFile') && config.hasOwnProperty('Name')) {
// console.log(' => VALID!');
if (config.hasOwnProperty('VocabFile')
&& config.hasOwnProperty('ModelFile') && config.hasOwnProperty('Name')
&& config.Name == baseModelName) {
// console.log(' => VALID! Found model ' + baseModelName);
return true;

@@ -53,4 +54,3 @@ }

function findModel(cwd) {
function findModel(cwd, baseModelName) {
fs.readdirSync(cwd).find( (dirInner) => {

@@ -63,3 +63,3 @@ dirInner = cwd + sep + dirInner;

!dirInner.endsWith("TestResults")) { // Don't bother looking in TestResults
return findModel(dirInner);
return findModel(dirInner, baseModelName);
}

@@ -71,3 +71,3 @@

dirInner = dtemp.join(sep);
if (validateConfigFile(dirInner)) {
if (validateConfigFile(dirInner, baseModelName)) {
model_dir = dirInner;

@@ -82,3 +82,4 @@ return true;

}
findModel(cwd);
findModel(cwd, baseModelName);
return model_dir;

@@ -85,0 +86,0 @@ };

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc