Skip to content

Commit 9920c94

Browse files
committed
Changed some unicode symbols, added github actions
1 parent c6a3b57 commit 9920c94

File tree

6 files changed

+107
-18
lines changed

6 files changed

+107
-18
lines changed

.github/dependabot.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
2+
version: 2
3+
updates:
4+
- package-ecosystem: "github-actions"
5+
directory: "/" # Location of package manifests
6+
schedule:
7+
interval: "weekly"

.github/workflows/CI.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: CI
2+
on:
3+
push:
4+
branches:
5+
- main
6+
tags: ['*']
7+
pull_request:
8+
workflow_dispatch:
9+
concurrency:
10+
# Skip intermediate builds: always.
11+
# Cancel intermediate builds: only if it is a pull request build.
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
14+
jobs:
15+
test:
16+
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }}
17+
runs-on: ${{ matrix.os }}
18+
timeout-minutes: 60
19+
permissions: # needed to allow julia-actions/cache to proactively delete old caches that it has created
20+
actions: write
21+
contents: read
22+
strategy:
23+
fail-fast: false
24+
matrix:
25+
version: ['1.12']
26+
os: [ubuntu-latest, windows-latest, macOS-latest]
27+
steps:
28+
- uses: actions/checkout@v6
29+
- uses: julia-actions/setup-julia@v2
30+
with:
31+
version: ${{ matrix.version }}
32+
- uses: julia-actions/cache@v2
33+
- uses: julia-actions/julia-buildpkg@v1
34+
- uses: julia-actions/julia-runtest@v1

.github/workflows/CompatHelper.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: CompatHelper
2+
on:
3+
schedule:
4+
- cron: 0 0 * * *
5+
workflow_dispatch:
6+
jobs:
7+
CompatHelper:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Pkg.add("CompatHelper")
11+
run: julia -e 'using Pkg; Pkg.add("CompatHelper")'
12+
- name: CompatHelper.main()
13+
env:
14+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
15+
COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }}
16+
run: julia -e 'using CompatHelper; CompatHelper.main()'

.github/workflows/TagBot.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: TagBot
2+
on:
3+
issue_comment:
4+
types:
5+
- created
6+
workflow_dispatch:
7+
inputs:
8+
lookback:
9+
default: "3"
10+
permissions:
11+
actions: read
12+
checks: read
13+
contents: write
14+
deployments: read
15+
issues: read
16+
discussions: read
17+
packages: read
18+
pages: read
19+
pull-requests: read
20+
repository-projects: read
21+
security-events: read
22+
statuses: read
23+
jobs:
24+
TagBot:
25+
if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot'
26+
runs-on: ubuntu-latest
27+
steps:
28+
- uses: JuliaRegistries/TagBot@v1
29+
with:
30+
token: ${{ secrets.GITHUB_TOKEN }}
31+
ssh: ${{ secrets.DOCUMENTER_KEY }}

examples/unconstrained_convex_optimization/accelerated_gradient_strongly_convex.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ function wc_accelerated_gradient_strongly_convex(mu, L, n; verbose=false)
2929

3030
if verbose
3131
@info "🐱 Example file: worst-case performance of the accelerated gradient method"
32-
@info "🫑 PEPit guarantee: f(x_n)-f_* <= $(round(PEPit_tau, digits=6)) (f(x_0) - f(x_*) + mu/2*||x_0 - x_*||^2)"
32+
@info "💻 PEPit guarantee: f(x_n)-f_* <= $(round(PEPit_tau, digits=6)) (f(x_0) - f(x_*) + mu/2*||x_0 - x_*||^2)"
3333
@info "📝 Theoretical guarantee: f(x_n)-f_* <= $(round(theoretical_tau, digits=6)) (f(x_0) - f(x_*) + mu/2*||x_0 - x_*||^2)"
3434
end
3535

src/core/pep.jl

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ function _eval_points_and_function_values!(pep::PEP, F_val::Vector{Float64}, G_v
9696
eig_val = ev.values
9797
eig_vec = ev.vectors
9898
if minimum(eig_val) < 0
99-
verbose && println("🫑 PEPit: Postprocessing: solver's output is not entirely feasible (smallest eigenvalue: $(minimum(eig_val)) < 0). Projecting Gram matrix.")
99+
verbose && println("💻 PEPit: Postprocessing: solver's output is not entirely feasible (smallest eigenvalue: $(minimum(eig_val)) < 0). Projecting Gram matrix.")
100100
eig_val = max.(eig_val, 0)
101101
end
102102

@@ -202,7 +202,7 @@ function _logdet_dimension_reduction!(model::JuMP.Model, G, objective, wc_value:
202202
W = inv(Symmetric(Gcorr + eig_regularization * I(pc)))
203203

204204
@objective(model, Min, sum(W[i, j] * G[i, j] for i in 1:pc, j in 1:pc))
205-
verbose && println(" 🫑 PEPit: Calling SDP solver (logdet step $k)")
205+
verbose && println(" 💻 PEPit: Calling SDP solver (logdet step $k)")
206206
optimize!(model)
207207

208208
wc_value = value(objective)
@@ -211,8 +211,8 @@ function _logdet_dimension_reduction!(model::JuMP.Model, G, objective, wc_value:
211211
nb2, thr2, Gcorr = _get_nb_eigs_and_corrected(Gval)
212212

213213
if verbose
214-
println(" 🫑 PEPit: Solver status: $(termination_status(model)); objective value: $(wc_value)")
215-
println(" 🫑 PEPit: Postprocessing: $nb2 eigenvalue(s) > $thr2 after $k logdet step(s)")
214+
println(" 💻 PEPit: Solver status: $(termination_status(model)); objective value: $(wc_value)")
215+
println(" 💻 PEPit: Postprocessing: $nb2 eigenvalue(s) > $thr2 after $k logdet step(s)")
216216
end
217217
end
218218

@@ -222,7 +222,8 @@ end
222222

223223

224224
function solve!(pep::PEP;
225-
solver=Mosek.Optimizer,
225+
solver=Clarabel.Optimizer,
226+
# Options for solver: Clarabel.Optimizer, Mosek.Optimizer
226227
verbose::Bool=true,
227228
tracetrick::Bool=false,
228229
logdetiters::Int=0,
@@ -243,7 +244,7 @@ function solve!(pep::PEP;
243244
end
244245

245246
pc, ec = Point_counter[], Expression_counter[]
246-
verbose && println(" 🫑 PEPit: Setting up the problem: size of the main PSD matrix: $(pc)x$(pc)")
247+
verbose && println(" 💻 PEPit: Setting up the problem: size of the main PSD matrix: $(pc)x$(pc)")
247248

248249
@variable(model, objective)
249250

@@ -253,15 +254,15 @@ function solve!(pep::PEP;
253254
main_psd_ref = @constraint(model, G in PSDCone())
254255

255256

256-
verbose && println(" 🫑 PEPit: Setting up the problem: performance measure is minimum of $(length(pep.list_of_performance_metrics)) element(s)")
257+
verbose && println(" 💻 PEPit: Setting up the problem: performance measure is minimum of $(length(pep.list_of_performance_metrics)) element(s)")
257258
perf_con_refs = Vector{Any}()
258259
for metric in pep.list_of_performance_metrics
259260
con = @constraint(model, objective <= _expression_to_jump(metric, F, G))
260261
push!(perf_con_refs, con)
261262
end
262263

263264

264-
verbose && println(" 🫑 PEPit: Setting up the problem: Adding initial conditions and general constraints ...")
265+
verbose && println(" 💻 PEPit: Setting up the problem: Adding initial conditions and general constraints ...")
265266
initial_con_refs = Vector{Any}()
266267
for cond in pep.list_of_conditions
267268
expr_jump = _expression_to_jump(cond.expression, F, G)
@@ -270,12 +271,12 @@ function solve!(pep::PEP;
270271
@constraint(model, expr_jump == 0)
271272
push!(initial_con_refs, cref)
272273
end
273-
verbose && println(" 🫑 PEPit: Setting up the problem: initial conditions and general constraints ($(length(pep.list_of_conditions)) constraint(s) added)")
274+
verbose && println(" 💻 PEPit: Setting up the problem: initial conditions and general constraints ($(length(pep.list_of_conditions)) constraint(s) added)")
274275

275276

276277
global_psd_refs = Vector{Tuple}()
277278
if !isempty(pep.list_of_psd)
278-
verbose && println(" 🫑 PEPit: Setting up the problem: $(length(pep.list_of_psd)) lmi constraint(s) added")
279+
verbose && println(" 💻 PEPit: Setting up the problem: $(length(pep.list_of_psd)) lmi constraint(s) added")
279280
for (k, psd_matrix) in enumerate(pep.list_of_psd)
280281
n = psd_matrix.shape[1]
281282
@variable(model, M[1:n, 1:n], Symmetric)
@@ -290,7 +291,7 @@ function solve!(pep::PEP;
290291
end
291292

292293

293-
verbose && println(" 🫑 PEPit: Setting up the problem: interpolation conditions for $(length(pep.list_of_functions)) function(s)")
294+
verbose && println(" 💻 PEPit: Setting up the problem: interpolation conditions for $(length(pep.list_of_functions)) function(s)")
294295
class_con_refs = Vector{Any}()
295296
class_psd_refs = Vector{Tuple}()
296297
for (i, f) in enumerate(pep.list_of_functions)
@@ -341,12 +342,12 @@ function solve!(pep::PEP;
341342
end
342343

343344

344-
verbose && println(" 🫑 PEPit: Compiling SDP")
345+
verbose && println(" 💻 PEPit: Compiling SDP")
345346
@objective(model, Max, objective)
346-
verbose && println(" 🫑 PEPit: Calling SDP solver")
347+
verbose && println(" 💻 PEPit: Calling SDP solver")
347348
optimize!(model)
348349
if verbose
349-
println(" 🫑 PEPit: Solver status: $(termination_status(model)); optimal value: $(objective |> value)")
350+
println(" 💻 PEPit: Solver status: $(termination_status(model)); optimal value: $(objective |> value)")
350351
end
351352
wc_value = value(objective)
352353

@@ -355,19 +356,19 @@ function solve!(pep::PEP;
355356
tol = tol_dimension_reduction
356357
@constraint(model, objective >= wc_value - tol)
357358
@objective(model, Min, sum(G[i, i] for i in 1:pc))
358-
verbose && println(" 🫑 PEPit: Calling SDP solver (trace heuristic)")
359+
verbose && println(" 💻 PEPit: Calling SDP solver (trace heuristic)")
359360
optimize!(model)
360361
wc_value = value(objective)
361362
if verbose
362-
println(" 🫑 PEPit: Solver status: $(termination_status(model)); objective value: $(wc_value)")
363+
println(" 💻 PEPit: Solver status: $(termination_status(model)); objective value: $(wc_value)")
363364
end
364365
end
365366

366367

367368
if logdetiters > 0
368369
nb, thr, _ = _get_nb_eigs_and_corrected(value.(G))
369370
if verbose
370-
println(" 🫑 PEPit: Postprocessing: $nb eigenvalue(s) > $thr before dimension reduction")
371+
println(" 💻 PEPit: Postprocessing: $nb eigenvalue(s) > $thr before dimension reduction")
371372
end
372373
wc_value = _logdet_dimension_reduction!(model, G, objective, wc_value;
373374
niter=logdetiters, eig_regularization=eig_regularization,

0 commit comments

Comments
 (0)