René's URL Explorer Experiment


Title: ecos crash on a very sparse problem · Issue #48 · embotech/ecos-python · GitHub

Open Graph Title: ecos crash on a very sparse problem · Issue #48 · embotech/ecos-python

X Title: ecos crash on a very sparse problem · Issue #48 · embotech/ecos-python

Description: The code below reproduces a non-deterministic bug which causes ecos to crash with the following message, on both Windows (python 3.10) and Gentoo Linux (python 3.8). Despite using the same inputs (by setting numpy's seed), the crash occu...

Open Graph Description: The code below reproduces a non-deterministic bug which causes ecos to crash with the following message, on both Windows (python 3.10) and Gentoo Linux (python 3.8). Despite using the same inputs (...

X Description: The code below reproduces a non-deterministic bug which causes ecos to crash with the following message, on both Windows (python 3.10) and Gentoo Linux (python 3.8). Despite using the same inputs (...

Opengraph URL: https://github.com/embotech/ecos-python/issues/48

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.112.3


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"ecos crash on a very sparse problem","articleBody":"The code below reproduces a non-deterministic bug which causes `ecos` to crash with the following message, on both Windows (python 3.10) and Gentoo Linux (python 3.8). Despite using the same inputs (by setting numpy's seed), the crash occurs after a varying number of trials. The code uses the correct parameters to trigger a crash 100% of the time (on my machine).\r\n\r\n```\r\nRuntimeError: Internal problem occurred in ECOS while setting up the problem.\r\nPlease send a bug report with data to Alexander Domahidi.\r\nEmail: domahidi@control.ee.ethz.ch\r\n```\r\n\r\nThe code:\r\n```\r\nimport numpy as np\r\nimport time\r\nimport math\r\nimport scipy\r\nimport qpsolvers\r\n\r\nnp.random.seed(1)\r\n\r\ndef relu_inv(x): d=np.empty_like(x); d[:]=x[:]; d[x[:]\u003c=0]=np.nan; return d\r\ndef relu(x): return (x>0)*x\r\ndef invH(x): return math.sqrt(2)*scipy.special.erfcinv(2*x)\r\n\r\nsolver = \"ecos\"\r\ndef optimize_fixed_points(X, H, threshold=0):\r\n    (N, P) = X.shape\r\n    assert np.all(H.shape == (N, P))\r\n    \r\n    # Solve quadratic problem for each row\r\n    W = np.empty((N, N)); W[:] = np.nan\r\n    Q = np.eye(N-1)\r\n    found = 0\r\n    for ii in range(N):\r\n        I = np.concatenate((np.array(range(ii),dtype=int),np.array(range(ii+1,N),dtype=int)))\r\n        I = I.reshape(I.shape[0],1)\r\n        J = np.nonzero(np.isfinite(H[ii,:])*1)[0]\r\n        coJ = np.nonzero(np.isnan(H[ii,:])*1)[0]\r\n        assert len(J)+len(coJ) == P\r\n        c = np.zeros(I.shape[0])\r\n        lb = None\r\n        A = X[I,J].T\r\n        b = H[ii,J]\r\n        G = X[I,coJ].T\r\n        z = np.ones(G.shape[0])*threshold\r\n        w = qpsolvers.solve_qp(Q, c, G, z, A, b, lb, solver=solver, abstol=1e-8, reltol=1e-6)\r\n        if w is not None:\r\n            assert np.all(np.isfinite(w))\r\n            assert np.linalg.norm(A@w-b)\u003c1e-6\r\n            assert np.all(G@w\u003cz+1e-6)\r\n            W[ii,ii] = 0\r\n            W[ii,I.T] = w\r\n            found += 1\r\n    return (W, found)\r\n\r\n# Problem parameters\r\nN = 128; f = 1/64; K = np.round(f*N); P = 1\r\nprint(\"N=%d K=%d P=%d\" % (N,K,P))\r\n\r\nfor i in range(100):\r\n    tictocT = time.time()\r\n    # Create patterns\r\n    X = relu(np.random.randn(N, P) - invH(f))\r\n    H = relu_inv(X)\r\n    (W, nfound) = optimize_fixed_points(X, H)\r\n    d = X - relu(W@X)\r\n    assert np.linalg.norm(d[np.isfinite(d[:])]) \u003c 1e-8, \"Fixed-points violation: %1.1e\"%np.linalg.norm(d[np.isfinite(d[:])])\r\n    assert nfound\u003cN or np.all(np.isfinite(W))\r\n    print(\"Done #%d (found %d/%d, took %1.1fsec).\"%(i, nfound, N, time.time()-tictocT))\r\n```","author":{"url":"https://github.com/uricohen","@type":"Person","name":"uricohen"},"datePublished":"2023-01-31T09:03:55Z","url":"https://github.com/embotech/ecos-python/issues/48"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:e92a9fb4-c3b1-7dee-1b6f-4ff6f0fb2607
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idE408:2A0A85:2C72C:3CB89:6B05CE01
html-safe-nonce6a13ab7c2719ce40bfd50f3e7f6d4d7b2b5580d0fd9d36d389a92b8d2ba92488
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNDA4OjJBMEE4NToyQzcyQzozQ0I4OTo2QjA1Q0UwMSIsInZpc2l0b3JfaWQiOiI1MzQxMjg2OTE1MjUxNzUyNDQ5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac37257dc726978453d08b3104e6bf42066384a2f689a8347fb5ac2ca2fcb9bcaf
hovercard-subject-tagissue:1563916324
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/embotech/ecos-python/48/issue_layout
twitter:imagehttps://opengraph.githubassets.com/43ceaa5d04fee106e110f83910844e85a896b1bb279fc3c53d8ee07578a68c43/embotech/ecos-python/issues/48
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/43ceaa5d04fee106e110f83910844e85a896b1bb279fc3c53d8ee07578a68c43/embotech/ecos-python/issues/48
og:image:altThe code below reproduces a non-deterministic bug which causes ecos to crash with the following message, on both Windows (python 3.10) and Gentoo Linux (python 3.8). Despite using the same inputs (...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameuricohen
hostnamegithub.com
expected-hostnamegithub.com
None08d6d51500e13cdaf71a9aad37c03e883f1143f9325056e77a14fa0d06d5bf64
turbo-cache-controlno-preview
go-importgithub.com/embotech/ecos-python git https://github.com/embotech/ecos-python.git
octolytics-dimension-user_id9467034
octolytics-dimension-user_loginembotech
octolytics-dimension-repository_id26031421
octolytics-dimension-repository_nwoembotech/ecos-python
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id26031421
octolytics-dimension-repository_network_root_nwoembotech/ecos-python
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release839b69d5acfb3181bc844f20b9848f74b957add3
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/embotech/ecos-python/issues/48#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fembotech%2Fecos-python%2Fissues%2F48
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fembotech%2Fecos-python%2Fissues%2F48
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=embotech%2Fecos-python
Reloadhttps://github.com/embotech/ecos-python/issues/48
Reloadhttps://github.com/embotech/ecos-python/issues/48
Reloadhttps://github.com/embotech/ecos-python/issues/48
embotechhttps://github.com/embotech
ecos-pythonhttps://github.com/embotech/ecos-python
Codehttps://github.com/embotech/ecos-python
Issues18 (18)https://github.com/embotech/ecos-python/issues
Pull requests1 (1)https://github.com/embotech/ecos-python/pulls
Actionshttps://github.com/embotech/ecos-python/actions
Projectshttps://github.com/embotech/ecos-python/projects
Security and qualityhttps://github.com/embotech/ecos-python/security
Insightshttps://github.com/embotech/ecos-python/insights
https://github.com/embotech/ecos-python
New issuehttps://github.com/login?return_to=https://github.com/embotech/ecos-python/issues/48
New issuehttps://github.com/login?return_to=https://github.com/embotech/ecos-python/issues/48
ecos crash on a very sparse problemhttps://github.com/embotech/ecos-python/issues/48#top
https://github.com/uricohen
uricohenhttps://github.com/uricohen
on Jan 31, 2023https://github.com/embotech/ecos-python/issues/48#issue-1563916324
https://github.com/uricohen
uricohenhttps://github.com/uricohen
on Feb 1, 2023https://github.com/embotech/ecos-python/issues/48#issuecomment-1411583657
Sign up for freehttps://github.com/signup?return_to=https://github.com/embotech/ecos-python/issues/48
Sign in to commenthttps://github.com/login?return_to=https://github.com/embotech/ecos-python/issues/48
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.