Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[chore] format code and fix lint issues #437

Merged
merged 1 commit into from
May 30, 2024
Merged

[chore] format code and fix lint issues #437

merged 1 commit into from
May 30, 2024

Conversation

Neet-Nestor
Copy link
Contributor

@Neet-Nestor Neet-Nestor commented May 30, 2024

This PR formats the entire repo and fixes or suppresses all lint issues by running the following commands:

  • npm run format
  • npm run lint

Testing

 $ npm test    

> @mlc-ai/[email protected] test
> yarn jest

yarn run v1.22.22
$ /Users/neet/code/web-llm/node_modules/.bin/jest
jest-haste-map: Haste module naming collision: chrome-extension
  The following files share their name; please adjust your hasteImpl:
    * <rootDir>/examples/chrome-extension/package.json
    * <rootDir>/examples/chrome-extension-webgpu-service-worker/package.json

jest-haste-map: Haste module naming collision: openai-api
  The following files share their name; please adjust your hasteImpl:
    * <rootDir>/examples/function-calling/package.json
    * <rootDir>/examples/json-mode/package.json

jest-haste-map: Haste module naming collision: simple-chat
  The following files share their name; please adjust your hasteImpl:
    * <rootDir>/examples/simple-chat-ts/package.json
    * <rootDir>/examples/simple-chat-upload/package.json

 PASS  tests/util.test.ts
 PASS  tests/openai_chat_completion.test.ts
 PASS  tests/generation_config.test.ts
  ● Console

    console.warn
      Only frequency_penalty is set; we default presence_penaty to 0.

      183 |   ) {
      184 |     config.presence_penalty = 0.0;
    > 185 |     log.warn("Only frequency_penalty is set; we default presence_penaty to 0.");
          |         ^
      186 |   }
      187 |   if (
      188 |     _hasValue(config.presence_penalty) &&

      at postInitAndCheckGenerationConfigValues (src/config.ts:185:9)
      at Object.<anonymous> (tests/generation_config.test.ts:79:43)

 PASS  tests/conv_template.test.ts
  ● Console

    console.log
      [INST] <<SYS>>
      You are a helpful, respectful and honest assistant.
      <</SYS>>
      
       test1 [/INST] test2 [INST] test3 [/INST]

      at Object.<anonymous> (tests/conv_template.test.ts:114:13)

 PASS  tests/multi_round_chat.test.ts
 PASS  tests/function_calling.test.ts

Test Suites: 6 passed, 6 total
Tests:       33 passed, 33 total
Snapshots:   0 total
Time:        1.84 s
Ran all test suites.
✨  Done in 2.97s.
npm run build 

> @mlc-ai/[email protected] build
> rollup -c && ./cleanup-index-js.sh


src/index.ts → lib/index.js...
created lib/index.js in 1.4s

Copy link
Contributor

@CharlieFRuan CharlieFRuan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you so much!

@CharlieFRuan CharlieFRuan merged commit 8fe80bd into main May 30, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants