Machine Learning के लिए CI/CD
Ravi Bhadauria
Machine Learning Engineer
main ब्रांच में merge होता है



ब्रांच में hello_world.py के रूप में सेव करें
import datetime
def main():
print("Hello, World!")
# Get the current time and print it
current_time = datetime.datetime.now()
print("Current time:", current_time)
if __name__ == "__main__":
main()
on:
pull_request:
branches: [ "main" ]
steps:
- name: My Action
uses: <org_or_user_name>/<reponame>@<version_number>
with:
action-argument: value
Action repository https://github.com/<org_or_user_name>/<reponame>
Arguments को with key से दिया जा सकता है
GitHub marketplace actions: https://github.com/actions
steps:
- name: Checkout
uses: actions/checkout@v3
steps:
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.9
main पर pull request पर trigger होता हैbuild जॉब में तीन steps हैंCheckout repository checkout करता हैSetup Python Python environment सेटअप करता हैRun Python script Python फ़ाइल चलाता हैname: PR
on:
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Run Python script
run: |
echo hello_world.py
python hello_world.py


Machine Learning के लिए CI/CD