Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cli/common/generate_item_yaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from pathlib import Path
from datetime import datetime, timezone
import click
from jinja2 import Environment, FileSystemLoader
from jinja2 import Environment, FileSystemLoader, select_autoescape

TEMPLATES = {
"function": "cli/utils/function_item_template.yaml.j2",
Expand Down Expand Up @@ -44,7 +44,7 @@ def generate_item_yaml(type: str, name: str, overwrite: bool = False):
}

# Load and render template
env = Environment(loader=FileSystemLoader("."))
env = Environment(loader=FileSystemLoader("."), autoescape=select_autoescape())
template = env.get_template(TEMPLATES[type])
rendered = template.render(params)

Expand Down
7 changes: 5 additions & 2 deletions cli/utils/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import sys
from glob import iglob
import yaml
from jinja2 import Template
from jinja2 import Template, select_autoescape

PROJECT_ROOT = Path(__file__).parent.parent.parent.absolute()

Expand All @@ -44,7 +44,10 @@ def render_jinja(
with open(template_path, "r") as t:
template_text = t.read()

template = Template(template_text)
autoescape = select_autoescape(enabled_extensions=("html", "htm", "xml"))(
str(template_path)
)
template = Template(template_text, autoescape=autoescape)
rendered = template.render(**data)

with open(output_path, "w+") as out_t:
Expand Down
2 changes: 1 addition & 1 deletion functions/src/describe/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
scikit-learn~=1.5.2
plotly~=5.23
pytest~=7.0.1
pytest~=9.0.3
matplotlib~=3.5.1
seaborn~=0.11.2
2 changes: 1 addition & 1 deletion functions/src/sklearn_classifier/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pandas
scikit-learn==1.0.2
scikit-learn==1.5.2
matplotlib
seaborn
scikit-plot
2 changes: 1 addition & 1 deletion modules/src/agent_deployer/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
mlrun==1.10.0
pytest~=8.2
pytest~=9.0.3
2 changes: 1 addition & 1 deletion modules/src/count_events/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
mlrun==1.10.0-rc41
pandas==2.1.4
pytest~=8.2
pytest~=9.0.3
2 changes: 1 addition & 1 deletion modules/src/openai_proxy_app/item.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ spec:
- fastapi==0.124.0
- uvicorn[standard]==0.38.0
- gunicorn==23.0.0
- requests==2.32.5
- requests==2.33.0
kind: generic
version: 1.0.0
2 changes: 1 addition & 1 deletion modules/src/openai_proxy_app/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
fastapi==0.124.0
uvicorn[standard]==0.38.0
gunicorn==23.0.0
requests==2.32.5
requests==2.33.0
Loading