Skip to content

Commit da0de86

Browse files
author
github-actions[bot]
committed
Publish repository: Thu Nov 20 10:23:04 UTC 2025
1 parent af7846c commit da0de86

File tree

4 files changed

+10
-9
lines changed

4 files changed

+10
-9
lines changed

.github/workflows/public_merge_check.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
git remote add public https://x-access-token:${{ secrets.PRIVATE_REPO_ARLDM }}@github.com/utiasDSL/ARLDM-Advanced-Robot-Learning-And-Decision-Making.git
2727
git fetch public ${{ github.ref_name }}
2828
29-
git checkout -b public_sync-${{ github.ref_name }} public/main
29+
git checkout -b public_sync-${{ github.ref_name }} origin/main
3030
3131
- name: Pick new commits (since lat repository publish)
3232
if: ${{ github.repository == 'utiasDSL/ARLDM-Advanced-Robot-Learning-And-Decision-Making' }}
@@ -68,7 +68,7 @@ jobs:
6868
6969
# Testing
7070
- name: Run pytest (Development)
71-
if: ${{ github.repository == 'utiasDSL/ARLDM-Advanced-Robot-Learning-And-Decision-Making' }}
71+
if: ${{ github.repository == 'utiasDSL/ARLDM-Advanced-Robot-Learning-And-Decision-Making' && github.event.inputs.admin_key != secrets.ADMIN_KEY }}
7272
working-directory: Advanced-Robot-Learning-and-Decision-Making-Programming-Exercises
7373
run: |
7474
if [[ "${{ github.event.inputs.admin_key }}" == "${{ secrets.ADMIN_KEY }}" ]]; then
@@ -91,7 +91,7 @@ jobs:
9191
"
9292
9393
- name: Run pytest (Application)
94-
if: ${{ github.repository == 'utiasDSL/ARLDM-Advanced-Robot-Learning-And-Decision-Making' }}
94+
if: ${{ github.repository == 'utiasDSL/ARLDM-Advanced-Robot-Learning-And-Decision-Making' && github.event.inputs.admin_key != secrets.ADMIN_KEY }}
9595
working-directory: Advanced-Robot-Learning-and-Decision-Making-Programming-Exercises
9696
run: |
9797
if [[ "${{ github.event.inputs.admin_key }}" == "${{ secrets.ADMIN_KEY }}" ]]; then

src/exercise04/exercise04/gaussian_process.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,7 @@ def fit(self, X, y):
231231
idx = np.random.choice(X.shape[0], self.max_samples, replace=False)
232232
X = X[idx]
233233
y = y[idx]
234+
self.X_train_subset = X # for prediction
234235
########################################################################
235236
# Task 1.2
236237
# TODO:
@@ -281,10 +282,10 @@ def predict(self, X_test, return_std=False) -> Union[np.ndarray, Tuple[np.ndarra
281282
# returned by default.
282283
########################################################################
283284
# Show relevant variables
284-
L = self.L
285-
X_train = self.X_train
286-
alphas = self.alphas
287-
kernel = self.kernel
285+
L = self.L
286+
X_train = self.X_train if not hasattr(self, "X_train_subset") else self.X_train_subset
287+
alphas = self.alphas
288+
kernel = self.kernel
288289
output_dim = self.output_dim
289290
mean, std = None, None # Compute those
290291
########################################################################
0 Bytes
Binary file not shown.

src/exercise04/test/behavior/test_exercise04.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ def setUp(self):
118118
self.X_train = np.random.rand(20, 5)
119119
self.y_train = np.random.rand(20, 2)
120120

121-
def test_init(self):
121+
def test_init_SVGP(self):
122122
"""Test if the SVGP model initializes correctly."""
123123
try:
124124
gp = SVGPStudent(X_train=self.X_train, num_tasks=self.y_train.shape[1], num_inducing_points=self.X_train.shape[0]//2)
@@ -166,7 +166,7 @@ def setUp(self):
166166
output_path = os.path.join(import_prefix, "outputs")
167167
self.checkpoint_path = os.path.join(output_path, "nn_checkpoint_ex04.ckpt")
168168

169-
def test_init(self):
169+
def test_init_NN(self):
170170
"""Test if the NeuralNetwork class can be initialized with a checkpoint."""
171171
try:
172172
model = NeuralNetwork(

0 commit comments

Comments
 (0)