{"action":"created","comment":{"url":"https://api.github.com/repos/JuliaNLSolvers/Optim.jl/pulls/comments/168562540","pull_request_review_id":96951767,"id":168562540,"diff_hunk":"@@ -5,7 +5,8 @@ module Optim\n     using Compat\n     using LineSearches\n     using NLSolversBase\n-    using Calculus\n+using Calculus","path":"src/Optim.jl","position":5,"original_position":5,"commit_id":"fd0d4ffa5c1b9bbeb006946d213fbf6e6ddbd013","original_commit_id":"fd0d4ffa5c1b9bbeb006946d213fbf6e6ddbd013","user":{"login":"pkofod","id":8431156,"avatar_url":"https://avatars0.githubusercontent.com/u/8431156?v=4","gravatar_id":"","url":"https://api.github.com/users/pkofod","html_url":"https://github.com/pkofod","followers_url":"https://api.github.com/users/pkofod/followers","following_url":"https://api.github.com/users/pkofod/following{/other_user}","gists_url":"https://api.github.com/users/pkofod/gists{/gist_id}","starred_url":"https://api.github.com/users/pkofod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pkofod/subscriptions","organizations_url":"https://api.github.com/users/pkofod/orgs","repos_url":"https://api.github.com/users/pkofod/repos","events_url":"https://api.github.com/users/pkofod/events{/privacy}","received_events_url":"https://api.github.com/users/pkofod/received_events","type":"User","site_admin":false},"body":"yeah, but this will be removed though, as gradients and Hessians are in now, right?","created_at":"2018-02-15T18:16:04Z","updated_at":"2018-02-15T18:16:05Z","html_url":"https://github.com/JuliaNLSolvers/Optim.jl/pull/518#discussion_r168562540","pull_request_url":"https://api.github.com/repos/JuliaNLSolvers/Optim.jl/pulls/518","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/JuliaNLSolvers/Optim.jl/pulls/comments/168562540"},"html":{"href":"https://github.com/JuliaNLSolvers/Optim.jl/pull/518#discussion_r168562540"},"pull_request":{"href":"https://api.github.com/repos/JuliaNLSolvers/Optim.jl/pulls/518"}},"in_reply_to_id":168554472},"pull_request":{"url":"https://api.github.com/repos/JuliaNLSolvers/Optim.jl/pulls/518","id":164524688,"html_url":"https://github.com/JuliaNLSolvers/Optim.jl/pull/518","diff_url":"https://github.com/JuliaNLSolvers/Optim.jl/pull/518.diff","patch_url":"https://github.com/JuliaNLSolvers/Optim.jl/pull/518.patch","issue_url":"https://api.github.com/repos/JuliaNLSolvers/Optim.jl/issues/518","number":518,"state":"open","locked":false,"title":"DiffeqDiffTools derivatives","user":{"login":"anriseth","id":5601805,"avatar_url":"https://avatars3.githubusercontent.com/u/5601805?v=4","gravatar_id":"","url":"https://api.github.com/users/anriseth","html_url":"https://github.com/anriseth","followers_url":"https://api.github.com/users/anriseth/followers","following_url":"https://api.github.com/users/anriseth/following{/other_user}","gists_url":"https://api.github.com/users/anriseth/gists{/gist_id}","starred_url":"https://api.github.com/users/anriseth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anriseth/subscriptions","organizations_url":"https://api.github.com/users/anriseth/orgs","repos_url":"https://api.github.com/users/anriseth/repos","events_url":"https://api.github.com/users/anriseth/events{/privacy}","received_events_url":"https://api.github.com/users/anriseth/received_events","type":"User","site_admin":false},"body":"This tries to use the DiffeqDiffTools finite difference derivatives rather than Calculus.\r\n\r\nI made a comparison between the running times using Calculus and this PR, available here:\r\nhttps://gist.github.com/anriseth/ccc51401525b923fbdc8147b2c8ed36f \r\n**Summary**: \r\n- DiffEqDiffTools is much faster at approximating the Hessian if it has access to the gradient\r\n- DiffEqDiffTools is much worse if we approximate the Hessian using the Jacobian of a finite-difference gradient (People should not do this anyway?)\r\n- DiffEqDiffTools is slightly slower at approximating gradients than Calculus. *Could be because the problems tested are too cheap, so the cache allocation is more costly?*\r\n\r\n**Preliminary conclusion:**\r\nIf this enables FD gradients for complex number optimization, then the little extra cost in gradient evaluation is worth it. We need to think about how to deal with Hessian when only `f` is supplied, however.\r\n\r\n**TODOs**:\r\n- [x] Test gradients for complex number optimization\r\n- [x] Update docs on complex number optimization and say we support finite difference gradients.\r\n- [ ] Update REQUIRE version DiffEqDiffTools\r\n- [x] Create an issue reminding us to update to DiffEqDiffTools Hessians when https://github.com/JuliaDiffEq/DiffEqDiffTools.jl/issues/13 is closed.\r\n- [x] ~Add a `warn_once` for Newton that it may be faster to use LBFGS instead of Finite Differences? (Alternatively, mention it in the docs)~\r\n- [x] ~Remove all Calculus remnants~\r\n- [x] ~Add `GradientCache` and `JacobianCache` as parameter inputs for OnceDifferentiable?~\r\n\r\nCloses #476 (almost)\r\n","created_at":"2018-01-23T09:38:33Z","updated_at":"2018-02-15T18:16:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f5598390a2772d612324f3d6ecc546dc02560db6","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/JuliaNLSolvers/Optim.jl/pulls/518/commits","review_comments_url":"https://api.github.com/repos/JuliaNLSolvers/Optim.jl/pulls/518/comments","review_comment_url":"https://api.github.com/repos/JuliaNLSolvers/Optim.jl/pulls/comments{/number}","comments_url":"https://api.github.com/repos/JuliaNLSolvers/Optim.jl/issues/518/comments","statuses_url":"https://api.github.com/repos/JuliaNLSolvers/Optim.jl/statuses/fd0d4ffa5c1b9bbeb006946d213fbf6e6ddbd013","head":{"label":"anriseth:diffeqdifftools","ref":"diffeqdifftools","sha":"fd0d4ffa5c1b9bbeb006946d213fbf6e6ddbd013","user":{"login":"anriseth","id":5601805,"avatar_url":"https://avatars3.githubusercontent.com/u/5601805?v=4","gravatar_id":"","url":"https://api.github.com/users/anriseth","html_url":"https://github.com/anriseth","followers_url":"https://api.github.com/users/anriseth/followers","following_url":"https://api.github.com/users/anriseth/following{/other_user}","gists_url":"https://api.github.com/users/anriseth/gists{/gist_id}","starred_url":"https://api.github.com/users/anriseth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anriseth/subscriptions","organizations_url":"https://api.github.com/users/anriseth/orgs","repos_url":"https://api.github.com/users/anriseth/repos","events_url":"https://api.github.com/users/anriseth/events{/privacy}","received_events_url":"https://api.github.com/users/anriseth/received_events","type":"User","site_admin":false},"repo":{"id":58089597,"name":"Optim.jl","full_name":"anriseth/Optim.jl","owner":{"login":"anriseth","id":5601805,"avatar_url":"https://avatars3.githubusercontent.com/u/5601805?v=4","gravatar_id":"","url":"https://api.github.com/users/anriseth","html_url":"https://github.com/anriseth","followers_url":"https://api.github.com/users/anriseth/followers","following_url":"https://api.github.com/users/anriseth/following{/other_user}","gists_url":"https://api.github.com/users/anriseth/gists{/gist_id}","starred_url":"https://api.github.com/users/anriseth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anriseth/subscriptions","organizations_url":"https://api.github.com/users/anriseth/orgs","repos_url":"https://api.github.com/users/anriseth/repos","events_url":"https://api.github.com/users/anriseth/events{/privacy}","received_events_url":"https://api.github.com/users/anriseth/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/anriseth/Optim.jl","description":"Optimization functions for Julia","fork":true,"url":"https://api.github.com/repos/anriseth/Optim.jl","forks_url":"https://api.github.com/repos/anriseth/Optim.jl/forks","keys_url":"https://api.github.com/repos/anriseth/Optim.jl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/anriseth/Optim.jl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/anriseth/Optim.jl/teams","hooks_url":"https://api.github.com/repos/anriseth/Optim.jl/hooks","issue_events_url":"https://api.github.com/repos/anriseth/Optim.jl/issues/events{/number}","events_url":"https://api.github.com/repos/anriseth/Optim.jl/events","assignees_url":"https://api.github.com/repos/anriseth/Optim.jl/assignees{/user}","branches_url":"https://api.github.com/repos/anriseth/Optim.jl/branches{/branch}","tags_url":"https://api.github.com/repos/anriseth/Optim.jl/tags","blobs_url":"https://api.github.com/repos/anriseth/Optim.jl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/anriseth/Optim.jl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/anriseth/Optim.jl/git/refs{/sha}","trees_url":"https://api.github.com/repos/anriseth/Optim.jl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/anriseth/Optim.jl/statuses/{sha}","languages_url":"https://api.github.com/repos/anriseth/Optim.jl/languages","stargazers_url":"https://api.github.com/repos/anriseth/Optim.jl/stargazers","contributors_url":"https://api.github.com/repos/anriseth/Optim.jl/contributors","subscribers_url":"https://api.github.com/repos/anriseth/Optim.jl/subscribers","subscription_url":"https://api.github.com/repos/anriseth/Optim.jl/subscription","commits_url":"https://api.github.com/repos/anriseth/Optim.jl/commits{/sha}","git_commits_url":"https://api.github.com/repos/anriseth/Optim.jl/git/commits{/sha}","comments_url":"https://api.github.com/repos/anriseth/Optim.jl/comments{/number}","issue_comment_url":"https://api.github.com/repos/anriseth/Optim.jl/issues/comments{/number}","contents_url":"https://api.github.com/repos/anriseth/Optim.jl/contents/{+path}","compare_url":"https://api.github.com/repos/anriseth/Optim.jl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/anriseth/Optim.jl/merges","archive_url":"https://api.github.com/repos/anriseth/Optim.jl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/anriseth/Optim.jl/downloads","issues_url":"https://api.github.com/repos/anriseth/Optim.jl/issues{/number}","pulls_url":"https://api.github.com/repos/anriseth/Optim.jl/pulls{/number}","milestones_url":"https://api.github.com/repos/anriseth/Optim.jl/milestones{/number}","notifications_url":"https://api.github.com/repos/anriseth/Optim.jl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/anriseth/Optim.jl/labels{/name}","releases_url":"https://api.github.com/repos/anriseth/Optim.jl/releases{/id}","deployments_url":"https://api.github.com/repos/anriseth/Optim.jl/deployments","created_at":"2016-05-04T23:10:13Z","updated_at":"2016-05-04T23:10:14Z","pushed_at":"2018-01-25T00:54:13Z","git_url":"git://github.com/anriseth/Optim.jl.git","ssh_url":"git@github.com:anriseth/Optim.jl.git","clone_url":"https://github.com/anriseth/Optim.jl.git","svn_url":"https://github.com/anriseth/Optim.jl","homepage":"","size":1466,"stargazers_count":0,"watchers_count":0,"language":"Julia","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"JuliaNLSolvers:master","ref":"master","sha":"7b4f8cb8021fe1ed0a2befc3789a2c60ee3c85e6","user":{"login":"JuliaNLSolvers","id":25707270,"avatar_url":"https://avatars0.githubusercontent.com/u/25707270?v=4","gravatar_id":"","url":"https://api.github.com/users/JuliaNLSolvers","html_url":"https://github.com/JuliaNLSolvers","followers_url":"https://api.github.com/users/JuliaNLSolvers/followers","following_url":"https://api.github.com/users/JuliaNLSolvers/following{/other_user}","gists_url":"https://api.github.com/users/JuliaNLSolvers/gists{/gist_id}","starred_url":"https://api.github.com/users/JuliaNLSolvers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JuliaNLSolvers/subscriptions","organizations_url":"https://api.github.com/users/JuliaNLSolvers/orgs","repos_url":"https://api.github.com/users/JuliaNLSolvers/repos","events_url":"https://api.github.com/users/JuliaNLSolvers/events{/privacy}","received_events_url":"https://api.github.com/users/JuliaNLSolvers/received_events","type":"Organization","site_admin":false},"repo":{"id":3933868,"name":"Optim.jl","full_name":"JuliaNLSolvers/Optim.jl","owner":{"login":"JuliaNLSolvers","id":25707270,"avatar_url":"https://avatars0.githubusercontent.com/u/25707270?v=4","gravatar_id":"","url":"https://api.github.com/users/JuliaNLSolvers","html_url":"https://github.com/JuliaNLSolvers","followers_url":"https://api.github.com/users/JuliaNLSolvers/followers","following_url":"https://api.github.com/users/JuliaNLSolvers/following{/other_user}","gists_url":"https://api.github.com/users/JuliaNLSolvers/gists{/gist_id}","starred_url":"https://api.github.com/users/JuliaNLSolvers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JuliaNLSolvers/subscriptions","organizations_url":"https://api.github.com/users/JuliaNLSolvers/orgs","repos_url":"https://api.github.com/users/JuliaNLSolvers/repos","events_url":"https://api.github.com/users/JuliaNLSolvers/events{/privacy}","received_events_url":"https://api.github.com/users/JuliaNLSolvers/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/JuliaNLSolvers/Optim.jl","description":"Optimization functions for Julia","fork":false,"url":"https://api.github.com/repos/JuliaNLSolvers/Optim.jl","forks_url":"https://api.github.com/repos/JuliaNLSolvers/Optim.jl/forks","keys_url":"https://api.github.com/repos/JuliaNLSolvers/Optim.jl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JuliaNLSolvers/Optim.jl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JuliaNLSolvers/Optim.jl/teams","hooks_url":"https://api.github.com/repos/JuliaNLSolvers/Optim.jl/hooks","issue_events_url":"https://api.github.com/repos/JuliaNLSolvers/Optim.jl/issues/events{/number}","events_url":"https://api.github.com/repos/JuliaNLSolvers/Optim.jl/events","assignees_url":"https://api.github.com/repos/JuliaNLSolvers/Optim.jl/assignees{/user}","branches_url":"https://api.github.com/repos/JuliaNLSolvers/Optim.jl/branches{/branch}","tags_url":"https://api.github.com/repos/JuliaNLSolvers/Optim.jl/tags","blobs_url":"https://api.github.com/repos/JuliaNLSolvers/Optim.jl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JuliaNLSolvers/Optim.jl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JuliaNLSolvers/Optim.jl/git/refs{/sha}","trees_url":"https://api.github.com/repos/JuliaNLSolvers/Optim.jl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JuliaNLSolvers/Optim.jl/statuses/{sha}","languages_url":"https://api.github.com/repos/JuliaNLSolvers/Optim.jl/languages","stargazers_url":"https://api.github.com/repos/JuliaNLSolvers/Optim.jl/stargazers","contributors_url":"https://api.github.com/repos/JuliaNLSolvers/Optim.jl/contributors","subscribers_url":"https://api.github.com/repos/JuliaNLSolvers/Optim.jl/subscribers","subscription_url":"https://api.github.com/repos/JuliaNLSolvers/Optim.jl/subscription","commits_url":"https://api.github.com/repos/JuliaNLSolvers/Optim.jl/commits{/sha}","git_commits_url":"https://api.github.com/repos/JuliaNLSolvers/Optim.jl/git/commits{/sha}","comments_url":"https://api.github.com/repos/JuliaNLSolvers/Optim.jl/comments{/number}","issue_comment_url":"https://api.github.com/repos/JuliaNLSolvers/Optim.jl/issues/comments{/number}","contents_url":"https://api.github.com/repos/JuliaNLSolvers/Optim.jl/contents/{+path}","compare_url":"https://api.github.com/repos/JuliaNLSolvers/Optim.jl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JuliaNLSolvers/Optim.jl/merges","archive_url":"https://api.github.com/repos/JuliaNLSolvers/Optim.jl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JuliaNLSolvers/Optim.jl/downloads","issues_url":"https://api.github.com/repos/JuliaNLSolvers/Optim.jl/issues{/number}","pulls_url":"https://api.github.com/repos/JuliaNLSolvers/Optim.jl/pulls{/number}","milestones_url":"https://api.github.com/repos/JuliaNLSolvers/Optim.jl/milestones{/number}","notifications_url":"https://api.github.com/repos/JuliaNLSolvers/Optim.jl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JuliaNLSolvers/Optim.jl/labels{/name}","releases_url":"https://api.github.com/repos/JuliaNLSolvers/Optim.jl/releases{/id}","deployments_url":"https://api.github.com/repos/JuliaNLSolvers/Optim.jl/deployments","created_at":"2012-04-04T22:19:35Z","updated_at":"2018-02-12T06:39:58Z","pushed_at":"2018-02-15T11:05:10Z","git_url":"git://github.com/JuliaNLSolvers/Optim.jl.git","ssh_url":"git@github.com:JuliaNLSolvers/Optim.jl.git","clone_url":"https://github.com/JuliaNLSolvers/Optim.jl.git","svn_url":"https://github.com/JuliaNLSolvers/Optim.jl","homepage":"","size":2304,"stargazers_count":285,"watchers_count":285,"language":"Julia","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":97,"mirror_url":null,"archived":false,"open_issues_count":36,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":97,"open_issues":36,"watchers":285,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/JuliaNLSolvers/Optim.jl/pulls/518"},"html":{"href":"https://github.com/JuliaNLSolvers/Optim.jl/pull/518"},"issue":{"href":"https://api.github.com/repos/JuliaNLSolvers/Optim.jl/issues/518"},"comments":{"href":"https://api.github.com/repos/JuliaNLSolvers/Optim.jl/issues/518/comments"},"review_comments":{"href":"https://api.github.com/repos/JuliaNLSolvers/Optim.jl/pulls/518/comments"},"review_comment":{"href":"https://api.github.com/repos/JuliaNLSolvers/Optim.jl/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/JuliaNLSolvers/Optim.jl/pulls/518/commits"},"statuses":{"href":"https://api.github.com/repos/JuliaNLSolvers/Optim.jl/statuses/fd0d4ffa5c1b9bbeb006946d213fbf6e6ddbd013"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"pkofod"}}