Skip to content

Commit 66317b9

Browse files
update makefile and refactor reputation metrics
1 parent a523bb9 commit 66317b9

2 files changed

Lines changed: 21 additions & 10 deletions

File tree

Makefile

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ install: install-python ## Install core dependencies
3131
@echo "🔧 Installing pre-commit hooks"
3232
@$(UV) run pre-commit install
3333
@echo ""
34-
@$(MAKE) update
34+
@$(MAKE) update-dockers
3535
@echo ""
3636
@$(MAKE) shell
3737

@@ -66,8 +66,8 @@ shell: ## Start a shell in the uv environment
6666
echo "🚀 Created by \033[1;34mEnrique Tomás Martínez Beltrán\033[0m <\033[1;34menriquetomas@um.es\033[0m>"; \
6767
fi
6868

69-
.PHONY: update
70-
update: ## Update docker images
69+
.PHONY: update-dockers
70+
update-dockers: ## Update docker images
7171
@echo "🐳 Updating docker images..."
7272
@echo "🐳 Building nebula-frontend docker image. Do you want to continue (overrides existing image)? (y/n)"
7373
@read ans; if [ "$${ans:-N}" = y ]; then \
@@ -76,14 +76,23 @@ update: ## Update docker images
7676
echo "Skipping nebula-frontend docker build."; \
7777
fi
7878
@echo ""
79-
@echo "🐳 Building nebula-core docker image. Do you want to continue? (overrides existing image)? (y/n)"
79+
@echo "🐳 Building nebula-core docker image. Do you want to continue (overrides existing image)? (y/n)"
8080
@read ans; if [ "$${ans:-N}" = y ]; then \
8181
docker build -t nebula-core .; \
8282
else \
8383
echo "Skipping nebula-core docker build."; \
8484
fi
8585
echo "🐳 Docker images updated."
8686

87+
.PHONY: update
88+
update: ## Update NEBULA code
89+
@echo "🔄 Updating NEBULA code..."
90+
@echo "🔄 Pulling latest changes from the repository..."
91+
@git pull origin main
92+
@echo "🔄 Updating submodules..."
93+
@git submodule update --init --recursive
94+
@echo "🔄 NEBULA code updated."
95+
8796
.PHONY: lock
8897
lock: ## Update the lock file
8998
@echo "🔒 This will update the lock file. Do you want to continue? (y/n)"

nebula/frontend/templates/deployment.html

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,7 @@ <h5 class="step-number">Defense <i class="fa fa-wrench"></i>
613613
<i class="fa fa-lock"></i>
614614
</label>
615615
</h5>
616-
<h5 class="step-title">With reputation</h5>
616+
<h5 class="step-title">Enable/Disable Reputation</h5>
617617
<div class="form-check form-switch" style="margin-left: 23px;">
618618
<input class="form-check-input" type="checkbox" id="reputationSwitch" style="display: inline; width: 80px; height: 30px;">
619619
</div>
@@ -636,11 +636,18 @@ <h5 class="step-title">Weighting Factor</h5>
636636
</div>
637637
<div id="reputation-metrics" style="display:none;">
638638
<h5 class="step-title">Reputation Metrics</h5>
639+
<p>Model-based metrics</p>
639640
<div class="form-check">
640641
<input class="form-check-input" type="checkbox" id="model-similarity" name="modelSimilarity">
641642
<label class="form-check-label" for="model-similarity">Model Similarity</label>
642643
<input class="form-control weight-input" type="number" id="weight-model-similarity" name="weightModelSimilarity" step="0.01" value="0" placeholder="Weight to model similarity" style="display: none; width: 30%; margin-top:2px;">
643644
</div>
645+
<div class="form-check">
646+
<input class="form-check-input" type="checkbox" id="fraction-parameters-changed" name="fractionParametersChanged" >
647+
<label class="form-check-label" for="fraction-parameters-changed">Fraction Parameters Changed</label>
648+
<input class="form-control weight-input" type="number" id="weight-fraction-parameters-changed" name="weightFractionParametersChanged" step="0.01" value="0" placeholder="Weight to fraction paremeters changed" style="display: none; width: 30%; margin-top:2px;">
649+
</div>
650+
<p>Communication-based metrics</p>
644651
<div class="form-check">
645652
<input class="form-check-input" type="checkbox" id="num-messages" name="numMessages">
646653
<label class="form-check-label" for="num-messages">Number of Messages</label>
@@ -651,11 +658,6 @@ <h5 class="step-title">Reputation Metrics</h5>
651658
<label class="form-check-label" for="model-arrival-latency">Model Arrival Latency</label>
652659
<input class="form-control weight-input" type="number" id="weight-model-arrival-latency" name="weightModelArrivalLatency" step="0.01" value="0" placeholder="Weight to model arrival latency" style="display: none; width: 30%; margin-top:2px;">
653660
</div>
654-
<div class="form-check">
655-
<input class="form-check-input" type="checkbox" id="fraction-parameters-changed" name="fractionParametersChanged" >
656-
<label class="form-check-label" for="fraction-parameters-changed">Fraction Parameters Changed</label>
657-
<input class="form-control weight-input" type="number" id="weight-fraction-parameters-changed" name="weightFractionParametersChanged" step="0.01" value="0" placeholder="Weight to fraction paremeters changed" style="display: none; width: 30%; margin-top:2px;">
658-
</div>
659661
<p id="weight-warning" style="color: red; display: none;">Total weight must not exceed 1.</p>
660662
</div>
661663
</div>

0 commit comments

Comments
 (0)