GithubHelp home page GithubHelp logo

kingabzpro / cicd-for-machine-learning Goto Github PK

View Code? Open in Web Editor NEW
18.0 1.0 4.0 1.17 MB

A beginner's project on automating the training, evaluation, versioning, and deployment of models using GitHub Actions.

Home Page: https://www.datacamp.com/tutorial/ci-cd-for-machine-learning

License: Apache License 2.0

Makefile 1.29% Jupyter Notebook 94.57% Python 4.14%
ci-cd cml hugging-face mlops mlops-workflow guide machine-learning

cicd-for-machine-learning's Introduction

Hey ๐Ÿ–, I'm Abid!

  • ๐ŸŽ– I am a certified data scientist who loves building machine learning applications.
  • โœ Currently working as a copywriter and editor in the data science industry.
  • ๐Ÿ’ป I'm looking for an experience in the field of developer advocacy engineer full-time.
  • ๐Ÿค๐Ÿป I'm open for collaborations in MLOps and LLMs domains.
  • ๐ŸŽฏ Goal (2024): Get better at operations and building stuff.

Follow me on:

abid abid | Medium abid | Kaggle abid | Twitterabid | Linkedinabid | DataCampabid | HuggingFaceabid | bio link

cicd-for-machine-learning's People

Contributors

kingabzpro avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

cicd-for-machine-learning's Issues

Error in Evaluation phase during CI and in Deployment phase during CD

Hi @kingabzpro ,
I received the below error during the Evaluation phase of my program during CI.

4s
Run make eval
echo "## Model Metrics" > report.md
cat ./Results/metrics.txt >> report.md
echo '\n## Confusion Matrix Plot' >> report.md
echo '![Confusion Matrix](./Results/model_results.png)' >> report.md
cml comment create report.md
{"date":"Sun May [1](https://github.com/VigneshVicky97/CICD-for-Machine-Learning/actions/runs/9150310174/job/25154930321#step:7:1)9 2024 20:25:55 GMT+0000 (Coordinated Universal Time)","error":{},"exception":true,"level":"error","message":"unhandledRejection: Invalid typed array length: 4294835[6](https://github.com/VigneshVicky97/CICD-for-Machine-Learning/actions/runs/9150310174/job/25154930321#step:7:7)11\nRangeError: Invalid typed array length: 4294835611\n    at new Int8Array (<anonymous>)\n    at Object.write (/snapshot/cml/node_modules/@npcz/magic/dist/magic-js.js:8:44[7](https://github.com/VigneshVicky97/CICD-for-Machine-Learning/actions/runs/9150310174/job/25154930321#step:7:8)44)\n    at Object.write (/snapshot/cml/node_modules/@npcz/magic/dist/magic-js.js:[8](https://github.com/VigneshVicky97/CICD-for-Machine-Learning/actions/runs/9150310174/job/25154930321#step:7:9):151332)\n    at doWritev (/snapshot/cml/node_modules/@npcz/magic/dist/magic-js.js:8:144274)\n    at _fd_write (/snapshot/cml/node_modules/@npcz/magic/dist/magic-js.js:8:144487)\n    at wasm://wasm/00123836:wasm-function[176]:0x1b8f4\n    at wasm://wasm/00123836:wasm-function[188]:0x1bdb2\n    at wasm://wasm/00123836:wasm-function[18[9](https://github.com/VigneshVicky97/CICD-for-Machine-Learning/actions/runs/9150310174/job/25154930321#step:7:10)]:0x1be5f\n    at wasm://wasm/00123836:wasm-function[416]:0x2afbb\n    at wasm://wasm/00123836:wasm-function[160]:0x1acfb","os":{"loadavg":[0.57,0.21,0.08],"uptime":225.65},"process":{"argv":["/opt/hostedtoolcache/cml/0.20.3/x64/cml","/snapshot/cml/bin/cml.js","comment","create","report.md"],"cwd":"/home/runner/work/CICD-for-Machine-Learning/CICD-for-Machine-Learning","execPath":"/opt/hostedtoolcache/cml/0.20.3/x64/cml","gid":127,"memoryUsage":{"arrayBuffers":222346,"external":34716079,"heapTotal":67862528,"heapUsed":31262664,"rss":139538432},"pid":1844,"uid":[10](https://github.com/VigneshVicky97/CICD-for-Machine-Learning/actions/runs/9150310174/job/25154930321#step:7:11)01,"version":"v16.16.0"},"stack":"RangeError: Invalid typed array length: 42948356[11](https://github.com/VigneshVicky97/CICD-for-Machine-Learning/actions/runs/9150310174/job/25154930321#step:7:12)\n    at new Int8Array (<anonymous>)\n    at Object.write (/snapshot/cml/node_modules/@npcz/magic/dist/magic-js.js:8:44744)\n    at Object.write (/snapshot/cml/node_modules/@npcz/magic/dist/magic-js.js:8:151332)\n    at doWritev (/snapshot/cml/node_modules/@npcz/magic/dist/magic-js.js:8:144274)\n    at _fd_write (/snapshot/cml/node_modules/@npcz/magic/dist/magic-js.js:8:144487)\n    at wasm://wasm/00123836:wasm-function[176]:0x1b8f4\n    at wasm://wasm/00123836:wasm-function[188]:0x1bdb2\n    at wasm://wasm/00123836:wasm-function[189]:0x1be5f\n    at wasm://wasm/00123836:wasm-function[416]:0x2afbb\n    at wasm://wasm/00123836:wasm-function[160]:0x1acfb","trace":[{"column":null,"file":null,"function":"new Int8Array","line":null,"method":null,"native":false},{"column":44744,"file":"/snapshot/cml/node_modules/@npcz/magic/dist/magic-js.js","function":"Object.write","line":8,"method":"write","native":false},{"column":151332,"file":"/snapshot/cml/node_modules/@npcz/magic/dist/magic-js.js","function":"Object.write","line":8,"method":"write","native":false},{"column":144274,"file":"/snapshot/cml/node_modules/@npcz/magic/dist/magic-js.js","function":"doWritev","line":8,"method":null,"native":false},{"column":144487,"file":"/snapshot/cml/node_modules/@npcz/magic/dist/magic-js.js","function":"_fd_write","line":8,"method":null,"native":false},{"column":null,"file":"wasm://wasm/00123836:wasm-function[176]","function":null,"line":null,"method":null,"native":false},{"column":null,"file":"wasm://wasm/00123836:wasm-function[188]","function":null,"line":null,"method":null,"native":false},{"column":null,"file":"wasm://wasm/00123836:wasm-function[189]","function":null,"line":null,"method":null,"native":false},{"column":null,"file":"wasm://wasm/00123836:wasm-function[416]","function":null,"line":null,"method":null,"native":false},{"column":null,"file":"wasm://wasm/00123836:wasm-function[160]","function":null,"line":null,"method":null,"native":false}]}
make: *** [Makefile:18: eval] Error 1
Error: Process completed with exit code 2.

Along with I also receive error during Deployment to Hugging face phase of CD.

0s
4s
Run make deploy HF=$HF
pip install -U "huggingface_hub[cli]"
Defaulting to user installation because normal site-packages is not writeable
Collecting huggingface_hub[cli]
  Downloading huggingface_hub-0.23.0-py3-none-any.whl (40[1](https://github.com/VigneshVicky97/CICD-for-Machine-Learning/actions/runs/9150315483/job/25154940494#step:3:1) kB)
     โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ” 401.2/401.2 KB 15.3 MB/s eta 0:00:00
Requirement already satisfied: pyyaml>=5.1 in /usr/lib/python3/dist-packages (from huggingface_hub[cli]) (5.4.1)
Collecting tqdm>=4.42.1
  Downloading tqdm-4.[6](https://github.com/VigneshVicky97/CICD-for-Machine-Learning/actions/runs/9150315483/job/25154940494#step:3:7)6.4-py3-none-any.whl (78 kB)
     โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ” [7](https://github.com/VigneshVicky97/CICD-for-Machine-Learning/actions/runs/9150315483/job/25154940494#step:3:8)8.3/78.3 KB 32.0 MB/s eta 0:00:00
Requirement already satisfied: packaging>=20.9 in /usr/local/lib/python3.10/dist-packages (from huggingface_hub[cli]) (24.0)
Collecting fsspec>=2023.5.0
  Downloading fsspec-2024.5.0-py3-none-any.whl (316 kB)
     โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ” 316.1/316.1 KB 6[8](https://github.com/VigneshVicky97/CICD-for-Machine-Learning/actions/runs/9150315483/job/25154940494#step:3:9).0 MB/s eta 0:00:00
Collecting filelock
  Downloading filelock-3.14.0-py3-none-any.whl (12 kB)
Requirement already satisfied: requests in /usr/lib/python3/dist-packages (from huggingface_hub[cli]) (2.25.1)
Collecting typing-extensions>=3.7.4.3
  Downloading typing_extensions-4.11.0-py3-none-any.whl (34 kB)
Collecting InquirerPy==0.3.4
  Downloading InquirerPy-0.3.4-py3-none-any.whl (67 kB)
     โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ” 67.7/67.7 KB 2[9](https://github.com/VigneshVicky97/CICD-for-Machine-Learning/actions/runs/9150315483/job/25154940494#step:3:10).0 MB/s eta 0:00:00
Collecting prompt-toolkit<4.0.0,>=3.0.1
  Downloading prompt_toolkit-3.0.43-py3-none-any.whl (386 kB)
     โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ” 386.1/386.1 KB 87.0 MB/s eta 0:00:00
Collecting pfzy<0.4.0,>=0.3.1
  Downloading pfzy-0.3.4-py3-none-any.whl (8.5 kB)
Collecting wcwidth
  Downloading wcwidth-0.2.13-py2.py3-none-any.whl (34 kB)
Installing collected packages: wcwidth, typing-extensions, tqdm, prompt-toolkit, pfzy, fsspec, filelock, InquirerPy, huggingface_hub
Successfully installed InquirerPy-0.3.4 filelock-3.14.0 fsspec-2024.5.0 huggingface_hub-0.23.0 pfzy-0.3.4 prompt-toolkit-3.0.43 tqdm-4.66.4 typing-extensions-4.[11](https://github.com/VigneshVicky97/CICD-for-Machine-Learning/actions/runs/9150315483/job/25154940494#step:3:12).0 wcwidth-0.2.13
git pull origin update
From https://github.com/VigneshVicky97/CICD-for-Machine-Learning
 * branch            update     -> FETCH_HEAD
 * [new branch]      update     -> origin/update
hint: You have divergent branches and need to specify how to reconcile them.
hint: You can do so by running one of the following commands sometime before
hint: your next pull:
hint:
hint:   git config pull.rebase false  # merge
hint:   git config pull.rebase true   # rebase
hint:   git config pull.ff only       # fast-forward only
hint:
hint: You can replace "git config" with "git config --global" to set a default
hint: preference for all repositories. You can also pass --rebase, --no-rebase,
hint: or --ff-only on the command line to override the configured default per
hint: invocation.
fatal: Need to specify how to reconcile divergent branches.
make: *** [Makefile:28: hf-login] Error [12](https://github.com/VigneshVicky97/CICD-for-Machine-Learning/actions/runs/9150315483/job/25154940494#step:3:13)8
Error: Process completed with exit code 2.

How can I solve these issues?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.