Skip to content

Commit

Permalink
DVC clean up (#1180)
Browse files Browse the repository at this point in the history
  • Loading branch information
thekevinscott authored Oct 8, 2023
1 parent 0167fb1 commit 980ee4b
Show file tree
Hide file tree
Showing 16 changed files with 16 additions and 117 deletions.
1 change: 0 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
.dvc
.pnpm-store
assets
coverage
Expand Down
6 changes: 0 additions & 6 deletions .dvcignore

This file was deleted.

59 changes: 0 additions & 59 deletions .github/actions/setup-dvc/action.yml

This file was deleted.

5 changes: 0 additions & 5 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,6 @@ jobs:
# with:
# detached: true

# - name: 'Setup DVC & Pull Models'
# uses: ./.github/actions/setup-dvc
# with:
# gdrive_credentials_data: ${{ secrets.GDRIVE_CREDENTIALS_DATA }}

- name: 'Setup PNPM'
uses: ./.github/actions/setup-pnpm

Expand Down
38 changes: 4 additions & 34 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:
with:
lfs: 'true'

- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
with:
detached: true
# - name: Setup tmate session
# uses: mxschmitt/action-tmate@v3
# with:
# detached: true

- name: 'Setup PNPM with Node 16'
uses: ./.github/actions/setup-pnpm
Expand Down Expand Up @@ -153,11 +153,6 @@ jobs:
with:
node-version: 16

# - name: 'Setup DVC & Pull Models'
# uses: ./.github/actions/setup-dvc
# with:
# gdrive_credentials_data: ${{ secrets.GDRIVE_CREDENTIALS_DATA }}

- name: 'Build Models'
run: pnpm test:integration:browserstack -- --ci --verbose --skipTest --skipUpscalerBuild --skipBundle

Expand Down Expand Up @@ -208,11 +203,6 @@ jobs:
with:
node-version: 16

# - name: 'Setup DVC & Pull Models'
# uses: ./.github/actions/setup-dvc
# with:
# gdrive_credentials_data: ${{ secrets.GDRIVE_CREDENTIALS_DATA }}

- name: 'Build Models'
run: pnpm test:integration:node -- --ci --verbose --skipTest --skipUpscalerBuild --skipBundle

Expand All @@ -239,11 +229,6 @@ jobs:
with:
node-version: 16

# - name: 'Setup DVC & Pull Models'
# uses: ./.github/actions/setup-dvc
# with:
# gdrive_credentials_data: ${{ secrets.GDRIVE_CREDENTIALS_DATA }}

# - name: Setup tmate session
# uses: mxschmitt/action-tmate@v3
# with:
Expand Down Expand Up @@ -272,11 +257,6 @@ jobs:
with:
node-version: 16

# - name: 'Setup DVC & Pull Models'
# uses: ./.github/actions/setup-dvc
# with:
# gdrive_credentials_data: ${{ secrets.GDRIVE_CREDENTIALS_DATA }}

- name: 'Build Models'
run: pnpm test:model -- --ci --verbose --skipTest --skipUpscalerBuild --skipBundle

Expand All @@ -300,11 +280,6 @@ jobs:
with:
node-version: 16

# - name: 'Setup DVC & Pull Models'
# uses: ./.github/actions/setup-dvc
# with:
# gdrive_credentials_data: ${{ secrets.GDRIVE_CREDENTIALS_DATA }}

- name: 'Build Models'
run: pnpm test:memory-leaks -- --ci --verbose --skipTest --skipUpscalerBuild --skipBundle

Expand Down Expand Up @@ -333,11 +308,6 @@ jobs:
# with:
# detached: true

# - name: 'Setup DVC & Pull Models'
# uses: ./.github/actions/setup-dvc
# with:
# gdrive_credentials_data: ${{ secrets.GDRIVE_CREDENTIALS_DATA }}

- name: 'Install dependencies'
run: pnpm install

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ const buildModel = async (
const modelsFolder = path.resolve(MODELS_DIR, model, 'models');
const modelFiles = fs.readdirSync(modelsFolder);
if (modelFiles.length === 0) {
throw new Error(`No model files found in folder ${modelsFolder}. Did you call dvc pull for ${model}?`);
throw new Error(`No model files found in folder ${modelsFolder}. Did you call or set up git lfs for ${model}?`);
}
}
if (opts.verbose) {
Expand Down
2 changes: 1 addition & 1 deletion models/default-model/.npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ node_modules
test
demo
DOC.mdx
models.dvc
.gitattributes
2 changes: 1 addition & 1 deletion models/esrgan-legacy/.npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ node_modules
test
demo
DOC.mdx
models.dvc
.gitattributes
2 changes: 1 addition & 1 deletion models/esrgan-medium/.npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ node_modules
test
demo
DOC.mdx
models.dvc
doc-snippets
.gitattributes
2 changes: 1 addition & 1 deletion models/esrgan-slim/.npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ node_modules
test
demo
DOC.mdx
models.dvc
doc-snippets
.gitattributes
3 changes: 2 additions & 1 deletion models/esrgan-thick/.npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ node_modules
test
demo
DOC.mdx
models.dvc
doc-snippets
.gitattributes
3 changes: 2 additions & 1 deletion models/pixel-upsampler/.npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ node_modules
test
demo
DOC.mdx
models.dvc
doc-snippets
.gitattributes
3 changes: 1 addition & 2 deletions netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
# NPM_FLAGS = "--version"
# [build]
# base = "docs/"
# # command = "pip install --upgrade pip && pip install dvc[all] && echo '>>>>>>>>' && GDRIVE_CREDENTIALS_DATA=$GDRIVE_CREDENTIALS_DATA dvc pull -v -r gdrive-service-account && npx pnpm i --store=node_modules/.pnpm-store && npx pnpm run build"
# command = "pip install --upgrade pip && pip install dvc[all] && echo '>>>>>>>>' && GDRIVE_CREDENTIALS_DATA=$GDRIVE_CREDENTIALS_DATA dvc pull -v -r gdrive-service-account && pnpm i --store=node_modules/.pnpm-store && pnpm run build"
# command = "pip install --upgrade pip && echo '>>>>>>>>' && pnpm i --store=node_modules/.pnpm-store && pnpm run build"
# # command = "npx pnpm i --store=node_modules/.pnpm-store && npx pnpm run build"
# # publish = "build"
# # ignore = "git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF ."
Expand Down
2 changes: 1 addition & 1 deletion scripts/package-scripts/build-model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ const buildModel = async (
const modelsFolder = path.resolve(MODELS_DIR, model, 'models');
const modelFiles = fs.readdirSync(modelsFolder);
if (modelFiles.length === 0) {
throw new Error(`No model files found in folder ${modelsFolder}. Did you call dvc pull for ${model}?`);
throw new Error(`No model files found in folder ${modelsFolder}. Did you enable Git LFS for ${model}?`);
}
}
if (opts.verbose) {
Expand Down
1 change: 0 additions & 1 deletion scripts/package-scripts/create-new-model-folder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ const createNpmIgnore = (): string => [
'test',
'demo',
'DOC.mdx',
'models.dvc',
].join('\n');

const createGitIgnore = () => [
Expand Down
2 changes: 1 addition & 1 deletion test/lib/node/prepare.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export const prepareScriptBundleForNodeCJS: Bundle<BundleOpts> = async ({
const modelsFolder = path.resolve(MODELS_DIR, packageName, 'models');
const modelFiles = fs.readdirSync(modelsFolder);
if (modelFiles.length === 0) {
throw new Error(`No model files found in folder ${modelsFolder}. Did you call dvc pull for ${packageName}?`);
throw new Error(`No model files found in folder ${modelsFolder}. Did you enable Git LFS for ${packageName}?`);
}
return {
src: path.resolve(MODELS_DIR, packageName),
Expand Down

0 comments on commit 980ee4b

Please sign in to comment.