Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ceacea1

Browse files
committed
attempt to run ci on windows
1 parent 3f340ab commit ceacea1

File tree

4 files changed

+17
-18
lines changed

4 files changed

+17
-18
lines changed

.github/workflows/pythonpackage.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,17 @@ jobs:
1010
max-parallel: 9
1111
matrix:
1212
python-version: ["3.7", "3.8", "3.9", "3.10"]
13-
os: [macos-latest, ubuntu-latest]
13+
os: [macos-latest, ubuntu-latest, windows-latest]
1414

1515
steps:
1616
- uses: actions/checkout@v1
1717
- name: Set up Python ${{ matrix.python-version }}
1818
uses: actions/setup-python@v1
1919
with:
2020
python-version: ${{ matrix.python-version }}
21+
- name: Install Dependencies (Windows)
22+
run: pip install "jax[cpu]===0.3.14" -f https://whls.blob.core.windows.net/unstable/index.html --use-deprecated legacy-resolver
23+
if: matrix.os == 'windows-latest'
2124
- name: Install dependencies
2225
run: |
2326
python -m pip install --upgrade pip

docs/source/tutorials/minimal-usage.ipynb

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -146,11 +146,11 @@
146146
},
147147
{
148148
"cell_type": "code",
149-
"execution_count": 7,
149+
"execution_count": 14,
150150
"metadata": {},
151151
"outputs": [],
152152
"source": [
153-
"w = rp.vanilla.design(Sigma, b)"
153+
"rp.vanilla.design??"
154154
]
155155
},
156156
{
@@ -161,7 +161,7 @@
161161
{
162162
"data": {
163163
"text/plain": [
164-
"array([0.2798628 , 0.08774909, 0.63238811])"
164+
"array([0.2798623 , 0.08774783, 0.63238987])"
165165
]
166166
},
167167
"execution_count": 8,
@@ -181,7 +181,7 @@
181181
{
182182
"data": {
183183
"text/plain": [
184-
"array([0.1594, 0.0126, 0.828 ])"
184+
"array([0.15939882, 0.01259953, 0.82800165])"
185185
]
186186
},
187187
"execution_count": 9,
@@ -226,9 +226,8 @@
226226
"name": "stderr",
227227
"output_type": "stream",
228228
"text": [
229-
"/Users/mirca/opt/miniconda3/lib/python3.7/site-packages/jax/lib/xla_bridge.py:120: UserWarning: No GPU/TPU found, falling back to CPU.\n",
230-
" warnings.warn('No GPU/TPU found, falling back to CPU.')\n",
231-
" 0%| | 0/500 [00:00<?, ?it/s]\n"
229+
"WARNING:absl:No GPU/TPU found, falling back to CPU. (Set TF_CPP_MIN_LOG_LEVEL=0 and rerun for more info.)\n",
230+
" 0%| | 2/500 [00:00<00:22, 21.95it/s]\n"
232231
]
233232
}
234233
],
@@ -244,7 +243,7 @@
244243
{
245244
"data": {
246245
"text/plain": [
247-
"array([0.2798628 , 0.08774909, 0.63238811])"
246+
"array([0.2798628 , 0.08774907, 0.63238813])"
248247
]
249248
},
250249
"execution_count": 12,
@@ -264,7 +263,7 @@
264263
{
265264
"data": {
266265
"text/plain": [
267-
"array([0.1594, 0.0126, 0.828 ])"
266+
"array([0.15939999, 0.01259999, 0.82800001])"
268267
]
269268
},
270269
"execution_count": 13,
@@ -314,7 +313,7 @@
314313
"name": "python",
315314
"nbconvert_exporter": "python",
316315
"pygments_lexer": "ipython3",
317-
"version": "3.7.4"
316+
"version": "3.8.3"
318317
}
319318
},
320319
"nbformat": 4,

riskparityportfolio/vanilla.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,4 @@ PYBIND11_MODULE(vanilla, m) {
100100
To get the risk parity portfolio, set `b` as the 1/n uniform vector.
101101
)pbdoc"
102102
);
103-
104-
#ifdef VERSION_INFO
105-
m.attr("__version__") = MACRO_STRINGIFY(VERSION_INFO);
106-
#else
107-
m.attr("__version__") = "dev";
108-
#endif
109103
};

riskparityportfolio/vanilla.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ vector_t risk_parity_portfolio_ccd_spinu(c_matrix_t& Sigma,
4646
vector_t risk_parity_portfolio_ccd_choi(c_matrix_t& cov,
4747
c_vector_t& b,
4848
const double tol = 1E-4,
49-
const int maxiter = 100) {
49+
const int maxiter = 100)
50+
{
5051
double ai;
5152
auto n = b.size();
5253
vector_t vol = cov.diagonal().array().sqrt();
@@ -72,3 +73,5 @@ vector_t risk_parity_portfolio_ccd_choi(c_matrix_t& cov,
7273
}
7374

7475
#endif
76+
77+

0 commit comments

Comments
 (0)