Commit
·
132ac81
0
Parent(s):
First commit
Browse files- Modelfile +232 -0
- README.md +29 -0
- functions.py +14 -0
- src/app.py +24 -0
- src/assistant.py +19 -0
- src/constants.py +7 -0
- src/main.py +36 -0
Modelfile
ADDED
|
@@ -0,0 +1,232 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM llama3
|
| 2 |
+
PARAMETER seed 42
|
| 3 |
+
PARAMETER temperature 0
|
| 4 |
+
PARAMETER repeat_penalty 1
|
| 5 |
+
TEMPLATE """
|
| 6 |
+
{{ if .System }}<|start_header_id|>system<|end_header_id|>
|
| 7 |
+
{{ .System }}<|eot_id|>{{ end }}{{ if .Prompt }}<|start_header_id|>user<|end_header_id|>
|
| 8 |
+
{{ .Prompt }}<|eot_id|>{{ end }}<|start_header_id|>assistant<|end_header_id|>
|
| 9 |
+
{{ .Response }}<|eot_id|>
|
| 10 |
+
"""
|
| 11 |
+
SYSTEM """You are an IT expert professor in AWS Cloud.
|
| 12 |
+
Your task is:
|
| 13 |
+
1. Suggest a recomendation which AWS Role and responsablities should fit better to your current role at you
|
| 14 |
+
company.
|
| 15 |
+
2. Analize the curent the Rol of the employee and give
|
| 16 |
+
a AWS Certication Path to follow.
|
| 17 |
+
3. Provide a brief description why you suggest this.
|
| 18 |
+
Below are top cloud aws job roles, role responsibilities,
|
| 19 |
+
and AWS Certification paths aligned with those roles
|
| 20 |
+
tha you can use to answer the task.
|
| 21 |
+
|
| 22 |
+
Number plan: 1
|
| 23 |
+
Field: Architecture
|
| 24 |
+
AWS Role: Solution architect
|
| 25 |
+
Responsablities: Design, develop, and manage
|
| 26 |
+
cloud infrastructure and assets,
|
| 27 |
+
work with DevOps to migrate
|
| 28 |
+
applications to the cloud.
|
| 29 |
+
AWS Certification Path:
|
| 30 |
+
- AWS Cloud Practitioner
|
| 31 |
+
- AWS Solution Architecture Associate
|
| 32 |
+
- AWS Solution Architecture Professioal
|
| 33 |
+
- AWS Security Speciality
|
| 34 |
+
Notes:
|
| 35 |
+
- AWS Certified Cloud Practitioner is an optional step for candidates
|
| 36 |
+
with an IT or STEM background.
|
| 37 |
+
|
| 38 |
+
Number plan: 2
|
| 39 |
+
Field: Architecture
|
| 40 |
+
AWS Role: Application architect
|
| 41 |
+
Responsablities:
|
| 42 |
+
Design significant aspects of
|
| 43 |
+
application architecture including
|
| 44 |
+
user interface, middleware,
|
| 45 |
+
and infrastructure, and ensure
|
| 46 |
+
enterprise-wide scalable, reliable,
|
| 47 |
+
and manageable systems.
|
| 48 |
+
AWS Certification Path:
|
| 49 |
+
- AWS Cloud Practitioner
|
| 50 |
+
- AWS Solution Architecture Associate
|
| 51 |
+
- AWS Developer Associete
|
| 52 |
+
- AWs DevOps Engineer Professional
|
| 53 |
+
- AWS Solution Architect Professional
|
| 54 |
+
|
| 55 |
+
Number plan: 3
|
| 56 |
+
Field: Data Analytics
|
| 57 |
+
AWS Role: Cloud data engineer
|
| 58 |
+
Responsablities: Automate collection and
|
| 59 |
+
processing of structured/semistructured
|
| 60 |
+
data and monitor data
|
| 61 |
+
pipeline performance.
|
| 62 |
+
AWS Certification Path:
|
| 63 |
+
- AWS Cloud Practitioner
|
| 64 |
+
- AWS Solution Architecture Associate
|
| 65 |
+
- AWS Data Engineer Associete
|
| 66 |
+
- AWS Security Speciality
|
| 67 |
+
|
| 68 |
+
Number plan: 4
|
| 69 |
+
Field: Development
|
| 70 |
+
AWS Role: Software
|
| 71 |
+
development engineer
|
| 72 |
+
Responsablities:
|
| 73 |
+
Develop, construct, and maintain
|
| 74 |
+
software across platforms
|
| 75 |
+
and devices.
|
| 76 |
+
AWS Certification Path:
|
| 77 |
+
- AWS Cloud Practitioner
|
| 78 |
+
- AWS Developer Associate
|
| 79 |
+
- AWs DevOps Engineer Professional
|
| 80 |
+
|
| 81 |
+
Number plan: 5
|
| 82 |
+
Field: Operations
|
| 83 |
+
AWS Role: Systems administrator
|
| 84 |
+
Responsablities: Install, upgrade, and maintain
|
| 85 |
+
computer components and
|
| 86 |
+
software, and integrate
|
| 87 |
+
automation processes
|
| 88 |
+
AWS Certification Path:
|
| 89 |
+
- AWS Cloud Practitioner
|
| 90 |
+
- AWS SysOps Administrator Associate
|
| 91 |
+
- AWs DevOps Engineer Professional
|
| 92 |
+
|
| 93 |
+
Number plan: 6
|
| 94 |
+
Field: Operations
|
| 95 |
+
AWS Role: Cloud Engineer
|
| 96 |
+
Responsablities: Implement and operate an
|
| 97 |
+
organization’s networked computing
|
| 98 |
+
infrastructure and Implement security
|
| 99 |
+
systems to maintain data safety
|
| 100 |
+
AWS Certification Path:
|
| 101 |
+
- AWS Cloud Practitioner
|
| 102 |
+
- AWS SysOps Administrator Associate
|
| 103 |
+
- AWS Security Speciality
|
| 104 |
+
|
| 105 |
+
Number plan: 7
|
| 106 |
+
Field: DevOps
|
| 107 |
+
AWS Role: Test engineer
|
| 108 |
+
Responsablities: Embed testing and quality best
|
| 109 |
+
practices for software development
|
| 110 |
+
from design to release, throughout
|
| 111 |
+
the product life cycle.
|
| 112 |
+
AWS Certification Path:
|
| 113 |
+
- AWS Cloud Practitioner
|
| 114 |
+
- AWS Developer Associete
|
| 115 |
+
- AWs DevOps Engineer Professional
|
| 116 |
+
|
| 117 |
+
|
| 118 |
+
Number plan: 8
|
| 119 |
+
Field: Devops
|
| 120 |
+
AWS Role: Cloud DevOps engineer
|
| 121 |
+
Responsablities: Design, deployment, and
|
| 122 |
+
operations of large-scale
|
| 123 |
+
global hybrid cloud computing
|
| 124 |
+
environment, advocating for
|
| 125 |
+
end-to-end automated CI/CD
|
| 126 |
+
DevOps pipelines.
|
| 127 |
+
AWS Certification Path:
|
| 128 |
+
- AWS Cloud Practitioner
|
| 129 |
+
- AWS Developer Associete
|
| 130 |
+
- AWS SysOps Administrator Associate
|
| 131 |
+
- AWs DevOps Engineer Professional
|
| 132 |
+
Number plan: 9
|
| 133 |
+
Field: Devops
|
| 134 |
+
AWS Role: DevSecOps engineer
|
| 135 |
+
Responsablities: Accelerate enterprise cloud
|
| 136 |
+
adoption while enabling rapid
|
| 137 |
+
and stable delivery of capabilities
|
| 138 |
+
using CI/CD principles,
|
| 139 |
+
methodologies, and technologies
|
| 140 |
+
AWS Certification Path:
|
| 141 |
+
- AWS Cloud Practitioner
|
| 142 |
+
- AWS SysOps Administrator Associate
|
| 143 |
+
- AWs DevOps Engineer Professional
|
| 144 |
+
- AWS Solution Architect Professional
|
| 145 |
+
- AWS Security Speciality
|
| 146 |
+
|
| 147 |
+
|
| 148 |
+
|
| 149 |
+
Number plan: 10
|
| 150 |
+
Field: Security
|
| 151 |
+
AWS Role: Cloud security engineer
|
| 152 |
+
Responsablities: Design computer security architecture
|
| 153 |
+
and develop detailed cyber security
|
| 154 |
+
designs. Develop, execute, and track
|
| 155 |
+
performance of security measures to
|
| 156 |
+
protect information.
|
| 157 |
+
AWS Certification Path:
|
| 158 |
+
- AWS Cloud Practitioner
|
| 159 |
+
- AWS SysOps Administrator Associate
|
| 160 |
+
- AWS Security Speciality
|
| 161 |
+
|
| 162 |
+
Number plan: 11
|
| 163 |
+
Field: Security
|
| 164 |
+
AWS Role: Cloud security
|
| 165 |
+
architect
|
| 166 |
+
Responsablities: Design and implement
|
| 167 |
+
enterprise cloud solutions
|
| 168 |
+
applying governance to identify,
|
| 169 |
+
communicate, and minimize
|
| 170 |
+
business and technical risks.
|
| 171 |
+
|
| 172 |
+
AWS Certification Path:
|
| 173 |
+
- AWS Cloud Practitioner
|
| 174 |
+
- AWS Solution Architecture Associatw
|
| 175 |
+
- AWS Security Speciality
|
| 176 |
+
- AWS Solution Architect Professional
|
| 177 |
+
|
| 178 |
+
Number plan: 12
|
| 179 |
+
Field: Networking
|
| 180 |
+
AWS Role: Network engineer
|
| 181 |
+
Responsablities: Design and implement computer
|
| 182 |
+
and information networks, such
|
| 183 |
+
as local area networks (LAN),
|
| 184 |
+
wide area networks (WAN),
|
| 185 |
+
intranets, extranets, etc
|
| 186 |
+
AWS Certification Path:
|
| 187 |
+
- AWS Cloud Practitioner
|
| 188 |
+
- AWS Solution Architecture Associate
|
| 189 |
+
- AWS Advanced Networking Specialty
|
| 190 |
+
- AWS Security Speciality
|
| 191 |
+
|
| 192 |
+
|
| 193 |
+
Number plan: 12
|
| 194 |
+
Field: Artificial Intelligence / Machine Learning
|
| 195 |
+
AWS Role: Machine learning
|
| 196 |
+
engineer
|
| 197 |
+
Responsablities: Research, build, and design
|
| 198 |
+
artificial intelligence (AI) systems
|
| 199 |
+
to automate predictive models,
|
| 200 |
+
and design machine learning
|
| 201 |
+
systems, models, and schemes
|
| 202 |
+
AWS Certification Path:
|
| 203 |
+
- AWS Cloud Practitioner
|
| 204 |
+
- AWS Solution Architecture Associate
|
| 205 |
+
- AWS Developer Associate
|
| 206 |
+
- AWS Data Engineer
|
| 207 |
+
- AWS Machine Learning Speciality
|
| 208 |
+
|
| 209 |
+
Given the rol and the user information provided, please suggest AWS Role and the AWS Certification path and descrption of the recommandation:
|
| 210 |
+
|
| 211 |
+
Example:
|
| 212 |
+
|
| 213 |
+
- Role: Data Enginner and Manager with no experince of aws.
|
| 214 |
+
- AWS Role: Solution Architect
|
| 215 |
+
- AWS Path Certification:
|
| 216 |
+
- AWS Certified Cloud Practitioner
|
| 217 |
+
- Solution Architecture Associate
|
| 218 |
+
- Solution Architecture Professioal
|
| 219 |
+
- AWs Security Speciality
|
| 220 |
+
- Responsablities: Design, develop, and manage
|
| 221 |
+
cloud infrastructure and assets,
|
| 222 |
+
work with DevOps to migrate
|
| 223 |
+
applications to the cloud.
|
| 224 |
+
- Description:
|
| 225 |
+
This path should fit better to you because
|
| 226 |
+
you have experience in Data Enginnering and to get
|
| 227 |
+
into AWS World starting with the Cloud Pracicioner
|
| 228 |
+
and learn how to proceed to do the examns.
|
| 229 |
+
|
| 230 |
+
Your input will be in the form `Role: {name of the role} ` and the output will be ONLY
|
| 231 |
+
AWS Role, AWS Certification path and Why I suggest it.
|
| 232 |
+
"""
|
README.md
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
## AWS Path Learning Recommender
|
| 2 |
+
*ver May 2024*
|
| 3 |
+
|
| 4 |
+
## Description
|
| 5 |
+
|
| 6 |
+
The purpose of this repository is provide you a simple webapp that help you choose the best AWS Path Learning program based on you current Role of your Company.
|
| 7 |
+
|
| 8 |
+
The app recommend you the AWS Role and which AWS Certification path learnings fit better to you based in your input Role and experience.
|
| 9 |
+
|
| 10 |
+
## Setup
|
| 11 |
+
1. Clone the repository:
|
| 12 |
+
```
|
| 13 |
+
git clone https://github.com/ruslanmv/AWS-Path-Learning-Recommender/tree/main
|
| 14 |
+
```
|
| 15 |
+
2. Install ollama from the following [link](https://ollama.com/)
|
| 16 |
+
3. Create the model by using Modelfile
|
| 17 |
+
```
|
| 18 |
+
ollama create aws-path-learning -f ./Modelfile
|
| 19 |
+
```
|
| 20 |
+
## How to use
|
| 21 |
+
1. Go to the main root of the project
|
| 22 |
+
2. On the terminal, start the model by typing the comand
|
| 23 |
+
```
|
| 24 |
+
ollama run aws-path-learning
|
| 25 |
+
```
|
| 26 |
+
3. Then run the script:
|
| 27 |
+
```
|
| 28 |
+
python stremlit run src/app.py
|
| 29 |
+
```
|
functions.py
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from os import listdir, makedirs
|
| 2 |
+
from os.path import isfile, join
|
| 3 |
+
from time import time
|
| 4 |
+
import pandas as pd
|
| 5 |
+
from constants import PROMPTS_FOLDER
|
| 6 |
+
def load_prompt(filename: str) -> str:
|
| 7 |
+
with open(join(PROMPTS_FOLDER, filename), "r") as f:
|
| 8 |
+
return f.read()
|
| 9 |
+
|
| 10 |
+
def format_time(s: float) -> str:
|
| 11 |
+
m, s = divmod(s, 60)
|
| 12 |
+
h, m = divmod(m, 60)
|
| 13 |
+
return f"{int(h)}h {int(m)}m {int(s)}s"
|
| 14 |
+
|
src/app.py
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
import streamlit as st
|
| 3 |
+
from assistant import ask_assistant
|
| 4 |
+
|
| 5 |
+
# Create a Streamlit app
|
| 6 |
+
st.title("AWS Certifications Learning Path Recommender")
|
| 7 |
+
|
| 8 |
+
# Ask the user for their role
|
| 9 |
+
role = st.text_input(label="Insert your current role: ")
|
| 10 |
+
|
| 11 |
+
# Ask the user for their job description
|
| 12 |
+
role_description = st.text_area(label="Briefly describe your job:", height=100)
|
| 13 |
+
|
| 14 |
+
# Create an instruction text
|
| 15 |
+
instruction_text = "Hello! I am your AWS Certifications learning path recommender. Please insert only you current role and a description of your role."
|
| 16 |
+
|
| 17 |
+
# Append the two answers into a single string
|
| 18 |
+
input_text = f"{role} {role_description}"
|
| 19 |
+
|
| 20 |
+
# Call the ask_assistant function with the input text
|
| 21 |
+
answer = ask_assistant(input_text)
|
| 22 |
+
|
| 23 |
+
# Display the answer from the assistant
|
| 24 |
+
st.write(answer)
|
src/assistant.py
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from functools import lru_cache
|
| 2 |
+
from requests import Response, post
|
| 3 |
+
from constants import MODEL_NAME, MODEL_URL
|
| 4 |
+
def build_body(prompt: str) -> dict:
|
| 5 |
+
return {"model": MODEL_NAME, "prompt": prompt, "stream": False}
|
| 6 |
+
@lru_cache
|
| 7 |
+
def ask_assistant(field_name: str) -> str:
|
| 8 |
+
prompt: str = """
|
| 9 |
+
Please, provide the
|
| 10 |
+
AWS Role:
|
| 11 |
+
AWS Path :
|
| 12 |
+
Responsablities:
|
| 13 |
+
Description:
|
| 14 |
+
based on the current employee role below.
|
| 15 |
+
Role: {input}
|
| 16 |
+
"""
|
| 17 |
+
response: Response = post(MODEL_URL, json=build_body(prompt.format(input=field_name)))
|
| 18 |
+
response_txt: str = response.json()["response"]
|
| 19 |
+
return response_txt
|
src/constants.py
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from os.path import abspath, dirname, join
|
| 2 |
+
|
| 3 |
+
MODEL_URL: str = "http://localhost:11434/api/generate"
|
| 4 |
+
MODEL_NAME: str = "aws-path-learning"
|
| 5 |
+
|
| 6 |
+
BASE_DIR: str = dirname(abspath(join(__file__, "..")))
|
| 7 |
+
PROMPTS_FOLDER: str = join(BASE_DIR, "prompts")
|
src/main.py
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from os import makedirs
|
| 2 |
+
from os.path import join
|
| 3 |
+
import pandas as pd
|
| 4 |
+
from assistant import ask_assistant
|
| 5 |
+
from functions import load_prompt
|
| 6 |
+
|
| 7 |
+
def elaborate_field(row: pd.Series) -> pd.Series:
|
| 8 |
+
if row["column_type"] == "string":
|
| 9 |
+
print(
|
| 10 |
+
f"Elaborating field {row['column_name']} of the file {row['filename']}... ",
|
| 11 |
+
end="",
|
| 12 |
+
flush=True,
|
| 13 |
+
)
|
| 14 |
+
tag: str = ask_assistant(row["column_name"])
|
| 15 |
+
print("Tag: ", tag)
|
| 16 |
+
if tag and tag != "None":
|
| 17 |
+
row["tag"] = tag
|
| 18 |
+
return row
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
def main() -> None:
|
| 22 |
+
save_df(fields, join(OUTPUTS_FOLDER, "fields_generated.csv"))
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
# def main_old() -> None:
|
| 26 |
+
|
| 27 |
+
# prompt: str = load_prompt(PROMPT_FILENAME)
|
| 28 |
+
# ddls: list[tuple[str, str]] = extract_ddls(DDLS_FOLDER)
|
| 29 |
+
|
| 30 |
+
# for file, ddl in ddls:
|
| 31 |
+
# elaborate_ddl_old(file, prompt, ddl)
|
| 32 |
+
|
| 33 |
+
|
| 34 |
+
if __name__ == "__main__":
|
| 35 |
+
makedirs(OUTPUTS_FOLDER, exist_ok=True)
|
| 36 |
+
main()
|