HolyLab / BlockRegistrationScheduler.jl

Multi-core image registration scheduler
1 stars 0 forks source link

Submitting changes on 0.4.4 of julia #26

Closed zhikai-liu closed 7 years ago

zhikai-liu commented 7 years ago

Hey, I am trying to submit my changes for RegisterWorkerRigid (which is my first time making changes to existing package) But I can't add PkgDev in julia 0.4.4 (on cannon) or 0.4.3 (on my laptop)

julia> Pkg.add("PkgDev") ERROR: PkgDev can't be installed because it has no versions that support 0.4.4-pre+29 of julia. You may need to update METADATA by running Pkg.update() in error at error.jl:22 in resolve at ./pkg/entry.jl:410 in edit at pkg/entry.jl:26 in anonymous at task.jl:447 in sync_end at ./task.jl:413 [inlined code] from task.jl:422 in add at pkg/entry.jl:46 in add at pkg/entry.jl:73 in anonymous at pkg/dir.jl:31 in cd at file.jl:22 in cd at pkg/dir.jl:31 in add at pkg.jl:23

zhikai-liu commented 7 years ago

Sorry, I read the documentation from v0.5, so that was a mistake. I changed the title of this issue because I encountered another problem. When I run Pkg.test("BlockRegistrationScheduler") after I edited the code, this happened:

INFO: Recompiling stale cache file /home/zhikai/.julia/lib/v0.4/ImageMagick.ji for module ImageMagick. ERROR: LoadError: LoadError: MethodError: gradient has no method matching gradient(::RegisterOptimize.RigidValue{2,Array{Float64,2},Interpolations.FilledExtrapolation{Float64,2,Interpolations.BSplineInterpolation{Float64,2,Array{Float64,2},Interpolations.BSpline{Interpolations.Quadratic{Interpolations.InPlace}},Interpolations.OnCell,0},Interpolations.BSpline{Interpolations.Quadratic{Interpolations.InPlace}},Interpolations.OnCell,Float64},Array{Float64,2}}) Closest candidates are: gradient(::Any, ::Any) gradient{N}(::Any, ::Any, ::ForwardDiff.Chunk{N}) in call at /home/zhikai/.julia/v0.4/BlockRegistration/src/RegisterOptimize.jl:166 in optimize_rigid at /home/zhikai/.julia/v0.4/BlockRegistration/src/RegisterOptimize.jl:81 in worker at /home/zhikai/.julia/v0.4/BlockRegistrationScheduler/src/RegisterWorkerRigid.jl:56 in driver at /home/zhikai/.julia/v0.4/BlockRegistrationScheduler/src/RegisterDriver.jl:145 in include at ./boot.jl:261 in include_from_node1 at ./loading.jl:304 in include at ./boot.jl:261 in include_from_node1 at ./loading.jl:304 in process_options at ./client.jl:280 in _start at ./client.jl:378 while loading /home/zhikai/.julia/v0.4/BlockRegistrationScheduler/test/rigid.jl, in expression starting on line 14 while loading /home/zhikai/.julia/v0.4/BlockRegistrationScheduler/test/runtests.jl, in expression starting on line 2 =====================[ ERROR: BlockRegistrationScheduler ]======================

failed process: Process(/usr/local/julia/julia/usr/bin/julia --check-bounds=yes --code-coverage=none --color=yes /home/zhikai/.julia/v0.4/BlockRegistrationScheduler/test/runtests.jl, ProcessExited(1)) [1]

INFO: Removing ImageMagick v0.1.8 INFO: Removing TestImages v0.1.1 INFO: Removing ZipFile v0.2.6 ERROR: BlockRegistrationScheduler had test errors in error at ./error.jl:21 in test at pkg/entry.jl:803 in anonymous at pkg/dir.jl:31 in cd at file.jl:22 in cd at pkg/dir.jl:31 in test at pkg.jl:71

Since the problem might involve other packages, this is the status of my packages:

julia> Pkg.status() 83 additional packages:

  • AffineTransforms 0.1.4
  • AxisAlgorithms 0.1.5
  • BinDeps 0.4.5
  • BlockRegistration 0.0.0- master (unregistered)
  • BlockRegistrationScheduler 0.0.0- zhikai_1st_fixes (unregistered, dirty)
  • Blosc 0.1.7
  • BufferedStreams 0.2.0
  • CUDArt 0.2.3
  • CUFFT 0.0.4
  • Cairo 0.2.35
  • Calculus 0.1.15
  • CellSegmentation 0.0.0- master (unregistered)
  • Codecs 0.2.0
  • ColorTypes 0.2.8
  • ColorVectorSpace 0.1.11
  • Colors 0.6.8
  • Compat 0.9.2
  • Compose 0.4.4
  • Contour 0.2.0
  • DataArrays 0.3.8
  • DataFrames 0.8.3
  • DataStructures 0.4.6
  • Distances 0.3.2
  • Distributions 0.11.0
  • Docile 0.5.23
  • DualNumbers 0.2.2
  • FileIO 0.1.3
  • FixedPointNumbers 0.1.8
  • FixedSizeArrays 0.2.4 master
  • Formatting 0.2.0
  • ForwardDiff 0.2.5+ master
  • GZip 0.2.20
  • Gadfly 0.4.4
  • Graphics 0.1.3
  • Graphs 0.7.0
  • Gtk 0.10.2
  • GtkUtilities 0.1.0
  • HDF5 0.6.6
  • Hexagons 0.0.4
  • ImagePlayer 0.0.0- master (unregistered)
  • Images 0.5.11 master
  • ImagineFormat 0.1.0+ teh/rehash
  • Immerse 0.0.11
  • Interpolations 0.3.6
  • Ipopt 0.2.4
  • IterativeSolvers 0.2.2
  • Iterators 0.1.10
  • JLD 0.6.4
  • JSON 0.7.1
  • JuMP 0.14.1
  • KernelDensity 0.3.0
  • Lazy 0.11.3
  • LegacyStrings 0.1.1
  • Libz 0.2.0
  • Loess 0.0.7
  • MAT 0.3.1
  • MacroTools 0.3.2
  • MathProgBase 0.5.6
  • Measures 0.0.3
  • Munkres 0.1.0
  • NLsolve 0.7.3
  • NaNMath 0.2.1
  • NeighborhoodClustering 0.0.0- master (unregistered)
  • Optim 0.3.1+ teh/constrained
  • PDMats 0.5.0
  • PositiveFactorizations 0.0.2
  • ProgressMeter 0.3.3
  • RFFT 0.0.0- master (unregistered)
  • Ratios 0.0.4
  • Reexport 0.0.3
  • Requires 0.2.2
  • ReverseDiffSparse 0.5.8
  • Rmath 0.1.3
  • SHA 0.2.1
  • SIUnits 0.0.6
  • Showoff 0.0.7
  • SortingAlgorithms 0.1.0
  • StatsBase 0.10.0
  • StatsFuns 0.3.1
  • TexExtensions 0.0.3
  • URIParser 0.1.6
  • WoodburyMatrices 0.2.0
  • Zlib 0.1.12
Cody-G commented 7 years ago

Hi Zhikai,

Thanks for contributing! You don't need the PkgDev package in order to make contributions. The standard way to do this would be as follows:

  1. Open an issue describing the bug (if it's a bug) or the feature you want to add.
  2. Create a new branch on your laptop using git from the command line, and change the code as much as you want
  3. Make sure the tests pass after you finish changing the code. Most packages have test scripts that you can run with Pkg.test("BlockRegistrationScheduler")
  4. When you are satisfied that your code is working, use git to "commit" the changes. (So far all changes are still local to your computer)
  5. Push your changes to github. Do not push directly to the "master" branch, but to a different branch, ideally one with a descriptive name.
  6. The automated testing server will test your code again. Actually you can skip the local testing in step 3 if you want.
  7. If the automated tests pass and we like your changes, then they will be merged into the "master" branch.

There is lots of info online about each of the git commands needed to do this, but do let me know if you get stuck!

Cody

On Mon, Oct 3, 2016 at 9:42 PM, zhikai notifications@github.com wrote:

Hey, I am trying to submit my changes for RegisterWorkerRigid (which is my first time making changes to existing package) But I can't add PkgDev in julia

julia> Pkg.add("PkgDev") ERROR: PkgDev can't be installed because it has no versions that support 0.4.4-pre+29 of julia. You may need to update METADATA by running Pkg.update() in error at error.jl:22 in resolve at ./pkg/entry.jl:410 in edit at pkg/entry.jl:26 in anonymous at task.jl:447 in sync_end at ./task.jl:413 [inlined code] from task.jl:422 in add at pkg/entry.jl:46 in add at pkg/entry.jl:73 in anonymous at pkg/dir.jl:31 in cd at file.jl:22 in cd at pkg/dir.jl:31 in add at pkg.jl:23

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/HolyLab/BlockRegistrationScheduler/issues/26, or mute the thread https://github.com/notifications/unsubscribe-auth/AE78hKXG0JaKC2Dr4BV88MIFnqQTja_uks5qwb0mgaJpZM4KNPwD .

zhikai-liu commented 7 years ago

@Cody-G Thanks, I just realized my mistake. I ran the test just now and I have a new problem. Please see my second comment!

Cody-G commented 7 years ago

Did you try the test before you edited the code? It's possible your edits didn't create the error, but it already existed due to recent changes in packages. If that's the case, the ForwardDiff might be the first one to check. But let me know the result when you run the test on the code before editing. If you're not sure how to do this in git, it depends on whether you've made commits yet or not. If not, you can just do a git stash to temporarily get rid of your changes. Then you can use git stash apply to get them back.

timholy commented 7 years ago

I have the impression that ForwardDiff did a redesign. We could either specify an old version of the ForwardDiff package, or update our code to the new version. I have a grant review due this afternoon, but soon I may be able to tackle code updates.

timholy commented 7 years ago

You could just submit this change without having the tests pass; if I remember correctly, it's a small change and it made things better for you. Good enough for me.

zhikai-liu commented 7 years ago

@Cody-G Thanks for the advice, and yes, it has the same problem in the original package. @timholy I tried submitting the change. At the last step, there is an error:

julia> Pkg.submit("BlockRegistrationScheduler") INFO: Forking HolyLab/BlockRegistrationScheduler to zhikai-liu Enter host password for user 'zhikai-liu': ERROR: strangely formatted HTTP response in curl at pkg/github.jl:53 in curl at pkg/github.jl:56 in token at pkg/github.jl:72 in req at pkg/github.jl:99 in POST at pkg/github.jl:112 in fork at pkg/github.jl:125 in pull_request at pkg/entry.jl:327 in submit at pkg/entry.jl:339 in submit at pkg/entry.jl:337 in anonymous at pkg/dir.jl:31 in cd at file.jl:22 in cd at pkg/dir.jl:31 in submit at pkg.jl:58

And this is running on cannon.

timholy commented 7 years ago

Hmm, I've not seen that one before. https://github.com/JuliaLang/julia/issues/15381 suggests we should upgrade to julia 0.4.5. Anyone object? (It's always a little scary to change versions, but 0.4.4->0.4.5 should be pretty safe.)

Cody-G commented 7 years ago

No objections from me!

On Oct 4, 2016 4:56 PM, "Tim Holy" notifications@github.com wrote:

Hmm, I've not seen that one before. JuliaLang/julia#15381 https://github.com/JuliaLang/julia/issues/15381 suggests we should upgrade to julia 0.4.5. Anyone object? (It's always a little scary to change versions, but 0.4.4->0.4.5 should be pretty safe.)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/HolyLab/BlockRegistrationScheduler/issues/26#issuecomment-251525552, or mute the thread https://github.com/notifications/unsubscribe-auth/AE78hERJn0dK3YOM3ld7LphFyz6m-4dWks5qwst1gaJpZM4KNPwD .

mdhe1248 commented 7 years ago

Neither do I! On Oct 5, 2016 8:39 AM, "Cody Greer" notifications@github.com wrote:

No objections from me!

On Oct 4, 2016 4:56 PM, "Tim Holy" notifications@github.com wrote:

Hmm, I've not seen that one before. JuliaLang/julia#15381 https://github.com/JuliaLang/julia/issues/15381 suggests we should upgrade to julia 0.4.5. Anyone object? (It's always a little scary to change versions, but 0.4.4->0.4.5 should be pretty safe.)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/HolyLab/BlockRegistrationScheduler/ issues/26#issuecomment-251525552, or mute the thread https://github.com/notifications/unsubscribe-auth/ AE78hERJn0dK3YOM3ld7LphFyz6m-4dWks5qwst1gaJpZM4KNPwD .

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/HolyLab/BlockRegistrationScheduler/issues/26#issuecomment-251677164, or mute the thread https://github.com/notifications/unsubscribe-auth/AMvfFQrWi1Zwa6DiyZXwsbTAC7euvrfJks5qw6iJgaJpZM4KNPwD .

zhikai-liu commented 7 years ago

Not at all!