Skip to content

Commit

Permalink
refactor: Update ipfs_huggingface_scraper_js package version to 1.0.16
Browse files Browse the repository at this point in the history
  • Loading branch information
endomorphosis committed Aug 31, 2024
1 parent 781e7ea commit b97edc0
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 26 deletions.
2 changes: 1 addition & 1 deletion ipfs_model_manager_js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"debug": "^4.3.4",
"esm": "^3.2.25",
"ipfs_faiss_js": "^1.0.4",
"ipfs_huggingface_scraper_js": "^1.0.12",
"ipfs_huggingface_scraper_js": "^1.0.16",
"ipfs_kit_js": "^1.0.22",
"ipfs_model_manager_js": "^1.0.9",
"libp2p_kit_js": "^1.0.5",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
"debug": "^4.3.4",
"esm": "^3.2.25",
"ipfs_faiss_js": "^1.0.4",
"ipfs_huggingface_scraper_js": "^1.0.12",
"ipfs_kit_js": "^1.0.22",
"ipfs_huggingface_scraper_js": "^1.0.16",
"ipfs_model_manager_js": "^1.0.9",
"libp2p_kit_js": "^1.0.5",
"orbitdb_kit_js": "^1.0.9",
Expand Down
48 changes: 24 additions & 24 deletions tests/test.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import libp2pKitJs from 'libp2p_kit_js'
import orbitDbKitJs from 'orbitdb_kit_js'
import ipfsFaissJs from 'ipfs_faiss_js'
import ipfsKitJs from 'ipfs_kit_js'
import { storachaKitJs } from '../storacha_kit_js/main.js';
import { fireproofDbKitJs } from '../fireproofdb_kit_js/main.js';
import { libp2pKitJs } from 'libp2p_kit_js'
import { ipfsKitJs } from 'ipfs_kit_js';
import { orbitDbKitJs } from 'orbitdb_kit_js';
// import { ipfsFaissJs } from 'ipfs_faiss_js'
// import { storachaKitJs } from '../storacha_kit_js/main.js';
// import { fireproofDbKitJs } from '../fireproofdb_kit_js/main.js';
import { ipfsModelManagerJs } from 'ipfs_model_manager_js';
import { requireConfig } from "../config/config.js";
import fs from "fs";
Expand All @@ -13,11 +13,12 @@ export default class testIpfsModelManager {
constructor(resources = {}, metadata = {}) {
this.ipfsModelManager = new ipfsModelManagerJs(resources, metadata)
this.orbitDbKit = new orbitDbKitJs(resources, metadata)
this.ipfsFaiss = new ipfsFaissJs(resources, metadata)
this.libp2pKit = new libp2pKitJs(resources, metadata)
this.ipfsKit = new ipfsKitJs(resources, metadata)
this.storachaKit = new storachaKitJs(resources, metadata)
this.fireproofDbKit = new fireproofDbKitJs(resources, metadata)
// this.storachaKit = new storachaKitJs(resources, metadata)
// this.fireproofDbKit = new fireproofDbKitJs(resources, metadata)
// this.ipfsFaiss = new ipfsFaissJs(resources, metadata)

const endpoint = "https://object.ord1.coreweave.com"
const access_key = "CWVFBNRZEEDYTAUM"
const secret_key = "cwoBNj1ILmRGxcm18EsWE5Qth4hVtmtNJPkLVW2AETU"
Expand Down Expand Up @@ -79,7 +80,6 @@ export default class testIpfsModelManager {
meta[key] = this.config[key];
}
}
this.modelManager = new ipfsModelManagerJs(resources, metadata);
}


Expand Down Expand Up @@ -563,38 +563,38 @@ export async function test(){
//"ipfs_path": ipfs_path
};

const models_manager = new ipfsModelManagerJs(null, meta);
const results = await models_manager.test();
// const models_manager = new ipfsModelManagerJs(null, meta);
// const results = await models_manager.test();
console.log(results);
}

if (import.meta.url === 'file://' + process.argv[1]) {
const testModelManager = new testIpfsModelManager();
const testS3 = new testS3Kit();
console.log("Running test");
// const testS3 = new testS3Kit();
try{
await testS3.test().then((result) => {
console.log("testS3Kit: ", result);
}).catch((error) => {
console.log("testS3Kit error: ", error);
throw error;
});

// await testS3.test().then((result) => {
// console.log("testS3Kit: ", result);
// }).catch((error) => {
// console.log("testS3Kit error: ", error);
// // throw error;
// });
const testModelManager = new testIpfsModelManager();
await testModelManager.init().then((init) => {
console.log("testIpfsModelManager init: ", init);
testModelManager.test().then((result) => {
console.log("testIpfsModelManager: ", result);
}).catch((error) => {
console.log("testIpfsModelManager error: ", error);
throw error;
// throw error;
});
}).catch((error) => {
console.error("testIpfsModelManager init error: ", error);
throw error;
// throw error;
});

}
catch(err){
console.log(err);
process.exit(1);
// process.exit(1);
}
}

0 comments on commit b97edc0

Please sign in to comment.