{"id":22894216,"url":"https://github.com/zib-iol/frankwolfe-py","last_synced_at":"2025-03-31T22:38:24.952Z","repository":{"id":232215151,"uuid":"750839295","full_name":"ZIB-IOL/frankwolfe-py","owner":"ZIB-IOL","description":null,"archived":false,"fork":false,"pushed_at":"2024-04-08T14:48:57.000Z","size":22,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-07T01:32:07.996Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ZIB-IOL.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-01-31T12:28:35.000Z","updated_at":"2024-08-24T22:27:33.000Z","dependencies_parsed_at":"2024-04-08T18:06:58.075Z","dependency_job_id":null,"html_url":"https://github.com/ZIB-IOL/frankwolfe-py","commit_stats":null,"previous_names":["zib-iol/frankwolfe-py"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZIB-IOL%2Ffrankwolfe-py","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZIB-IOL%2Ffrankwolfe-py/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZIB-IOL%2Ffrankwolfe-py/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZIB-IOL%2Ffrankwolfe-py/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ZIB-IOL","download_url":"https://codeload.github.com/ZIB-IOL/frankwolfe-py/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246552972,"owners_count":20795835,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-13T23:17:14.120Z","updated_at":"2025-03-31T22:38:24.929Z","avatar_url":"https://github.com/ZIB-IOL.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# frankwolfe-py\n\nThis package is a python wrapper for [FrankWolfe.jl](https://github.com/ZIB-IOL/FrankWolfe.jl).\n\n## Installation\n\nFirst, download the package [frankwolfe-py](https://github.com/ZIB-IOL/frankwolfe-py).\n\nMove to the root of the package and execute on a terminal the following command:\n```bash  \npip install .\n```\n\nNow you can use the FrankWolfe.jl functions with \n```python\nfrom frankwolfepy import frankwolfe\n```\n\nand the wrapper of the objective function with\n```python\nfrom frankwolfepy import wrapper\n```\n\n## Usage \n\nBecause of compatibility issues between Python and Julia number types, each objective function must be wrapped if the algorithm is used with `verbose=true`.\n\nIn each file, import wrapper and wrap the objective function using:\n```python\nf = wrapper.wrap_objective_function(f).\n```\n\nA simple example : \n\n```python\nfrom frankwolfepy import frankwolfe\nfrom frankwolfepy import wrapper\nimport numpy as np\n\ndef f(x): #objective function\n    return np.linalg.norm(x)**2\n\nf = wrapper.wrap_objective_function(f) #wrap the objective function\n\ndef grad(storage,x): #gradient computation\n    for i in range(len(x)):\n        storage[i] = x[i]\n\n# Create the Linear Minimization Oracle\nlmo_prob = frankwolfe.ProbabilitySimplexOracle(1)\n\n# Compute first point\nx0 = frankwolfe.compute_extreme_point(lmo_prob,np.zeros(5))\n\n#Solve the optimisation problem using vanilla Frank-Wolfe algorithm\nfrankwolfe.frank_wolfe(\n    f,\n    grad,\n    lmo_prob,\n    x0,\n    max_iteration=1000,\n    line_search=frankwolfe.Agnostic(),\n    verbose=True,\n)\n```\n\nFor documentation on FrankWolfe.jl: https://zib-iol.github.io/FrankWolfe.jl/dev/\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzib-iol%2Ffrankwolfe-py","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzib-iol%2Ffrankwolfe-py","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzib-iol%2Ffrankwolfe-py/lists"}