Stochastic Gradient Descent (SGD) in julia?

Im trying to run the newest version of OptimizationManopt.jl together with NeuralPDE.jl. When trying to add NeuralPDE.jl to the environment i get a long stacktrace with unsatisfiable requirements. When adding both to an environment, it works when OptimizationManopt.jl is fixed at an older version.

In the stacktrace we can se e.g. that the version requirements on DocStringExtensions.jl is a problem. Why do packages like this restrict the version of a docs related package?

How can i resolve something like the below?

ERROR: Unsatisfiable requirements detected for package NeuralPDE [315f7962]:                                                                             
 NeuralPDE [315f7962] log:    
 ├─possible versions are: 2.0.0 - 5.20.0 or uninstalled     
 ├─restricted to versions * by an explicit requirement, leaving only versions: 2.0.0 - 5.20.0                     
 ├─restricted by compatibility requirements with DocStringExtensions [ffbed154] to versions: [2.0.0 - 3.8.2, 4.10.0 - 5.20.0] or uninstalled, leaving onl
y versions: [2.0.0 - 3.8.2, 4.10.0 - 5.20.0]                                                                                         
 │ └─DocStringExtensions [ffbed154] log:
 │   ├─possible versions are: 0.4.6 - 0.9.5 or uninstalled                  
 │   └─restricted to versions 0.9 by OptimizationBase [bca83a33], leaving only versions: 0.9.0 - 0.9.5                                                   
 │     └─OptimizationBase [bca83a33] log:                                                                                            
 │       ├─possible versions are: 4.0.2 or uninstalled
 │       └─OptimizationBase [bca83a33] is fixed to version 4.0.2                                                                     
 ├─restricted by compatibility requirements with ArrayInterface [4fba245c] to versions: [2.0.0 - 3.8.0, 5.0.0 - 5.20.0] or uninstalled, leaving only vers
ions: [2.0.0 - 3.8.0, 5.0.0 - 5.20.0] 
 │ └─ArrayInterface [4fba245c] log:                       
 │   ├─possible versions are: 0.0.1 - 7.22.0 or uninstalled                                                                          
 │   └─restricted to versions 7.6.0 - 7 by OptimizationBase [bca83a33], leaving only versions: 7.6.0 - 7.22.0                                            
 │     └─OptimizationBase [bca83a33] log: see above                                                                                  
 ├─restricted by compatibility requirements with SciMLBase [0bca4576] to versions: [2.0.0 - 3.6.0, 5.9.0 - 5.20.0] or uninstalled, leaving only versions:
 [2.0.0 - 3.6.0, 5.9.0 - 5.20.0] 
 │ └─SciMLBase [0bca4576] log:                                    
 │   ├─possible versions are: 1.0.0 - 2.126.0 or uninstalled                                                                         
 │   └─restricted to versions 2.122.1 - 2 by OptimizationBase [bca83a33], leaving only versions: 2.122.1 - 2.126.0                                       
 │     └─OptimizationBase [bca83a33] log: see above                                                                                  
 ├─restricted by compatibility requirements with Reexport [189a3867] to versions: 3.3.0 - 5.20.0 or uninstalled, leaving only versions: [3.3.0 - 3.6.0, 5
.9.0 - 5.20.0]                   
 │ └─Reexport [189a3867] log:                                     
 │   ├─possible versions are: 0.2.0 - 1.2.2 or uninstalled                                                                           
 │   └─restricted to versions 1.2.0 - 1 by OptimizationBase [bca83a33], leaving only versions: 1.2.0 - 1.2.2                                             
 │     └─OptimizationBase [bca83a33] log: see above                                                                                  
 ├─restricted by compatibility requirements with Integrals [de52edbc] to versions: [2.0.0 - 4.11.0, 5.10.0 - 5.20.0] or uninstalled, leaving only version
s: [3.3.0 - 3.6.0, 5.10.0 - 5.20.0]                               
 │ └─Integrals [de52edbc] log:                                                                                                       
 │   ├─possible versions are: 3.0.0 - 4.7.1 or uninstalled                  
 │   └─restricted by compatibility requirements with SciMLBase [0bca4576] to versions: 4.0.0 - 4.7.1 or uninstalled                                      
 │     └─SciMLBase [0bca4576] log: see above                  
 ├─restricted by compatibility requirements with Optimization [7f7a1694] to versions: 2.0.0 - 4.10.1 or uninstalled, leaving only versions: 3.3.0 - 3.6.0
 │ └─Optimization [7f7a1694] log:                                 
 │   ├─possible versions are: 3.5.0 - 5.1.0 or uninstalled                                                                           
 │   ├─restricted by compatibility requirements with SciMLBase [0bca4576] to versions: 3.19.0 - 5.1.0 or uninstalled                                     
 │   │ └─SciMLBase [0bca4576] log: see above
 │   ├─restricted by compatibility requirements with ADTypes [47edcb42] to versions: [3.5.0 - 3.14.1, 3.25.1 - 5.1.0] or uninstalled, leaving only versions: 3.25.1 - 5.1.0 or uninstalled                                 
 │   │ └─ADTypes [47edcb42] log:                                  
 │   │   ├─possible versions are: 0.1.0 - 1.18.0 or uninstalled
 │   │   └─restricted to versions 1.14.0 - 1 by OptimizationBase [bca83a33], leaving only versions: 1.14.0 - 1.18.0
 │   │     └─OptimizationBase [bca83a33] log: see above                                                                              
 │   └─restricted by compatibility requirements with OptimizationBase [bca83a33] to versions: [3.5.0 - 3.23.0, 5.1.0] or uninstalled, leaving only versio
ns: 5.1.0 or uninstalled                                          
 │     └─OptimizationBase [bca83a33] log: see above                                                                                  
 └─restricted by compatibility requirements with Distributions [31c24e10] to versions: 3.11.0 - 5.20.0 or uninstalled — no versions left
   └─Distributions [31c24e10] log:                                                                                                   
     ├─possible versions are: 0.16.0 - 0.25.122 or uninstalled
     ├─restricted by compatibility requirements with NeuralPDE [315f7962] to versions: 0.23.0 - 0.25.122                                                 
     │ └─NeuralPDE [315f7962] log: see above                                                                                         
     ├─restricted by compatibility requirements with SciMLBase [0bca4576] to versions: 0.25.0 - 0.25.122 or uninstalled, leaving only versions: 0.25.0 - 
0.25.122                                                          
     │ └─SciMLBase [0bca4576] log: see above                                
     └─restricted by compatibility requirements with FillArrays [1a297f60] to versions: [0.16.0 - 0.21.9, 0.25.87 - 0.25.122] or uninstalled, leaving onl
y versions: 0.25.87 - 0.25.122        
       └─FillArrays [1a297f60] log:                                                                                                  
         ├─possible versions are: 0.2.0 - 1.15.0 or uninstalled                                                                      
         ├─restricted by julia compatibility requirements to versions: 0.13.8 - 1.15.0 or uninstalled                                                    
         └─restricted by compatibility requirements with SparseConnectivityTracer [9f842d2f] to versions: 1.0.0 - 1.15.0                                 
           └─SparseConnectivityTracer [9f842d2f] log:                       
             ├─possible versions are: 0.1.0 - 1.1.2 or uninstalled          
             ├─restricted to versions [0.6, 1] by OptimizationBase [bca83a33], leaving only versions: 0.6.0 - 1.1.2                                      
             │ └─OptimizationBase [bca83a33] log: see above                 
             └─restricted by compatibility requirements with DifferentiationInterface [a0c0ee7d] to versions: 0.6.14 - 1.1.2 or uninstalled, leaving only
 versions: 0.6.14 - 1.1.2             
               └─DifferentiationInterface [a0c0ee7d] log:                   
                 ├─possible versions are: 0.1.0 - 0.7.11 or uninstalled                                                                                  
                 └─restricted to versions 0.7 by OptimizationBase [bca83a33], leaving only versions: 0.7.0 - 0.7.11                                      
                   └─OptimizationBase [bca83a33] log: see above             

1 Like

I am not sure, but the packages you mention probably use features from the DocStringExtensions to automatically generate their documentation strings – so that is necessary then within the package.

But to me that does not seem the issue, since 0.9.x for that package should be fine. The conflict is a bit crowded to see which package actually is the culprit.

but a careful remark: The interface to Manopt.jl is a very preliminary one and not yet in a really stable state.
Maybe you could either use Manopt.jl directly or check whether another SGD does the job for you as well?

1 Like

Thanks, yeah i guess it makes more sense. However, for now I’ll try using OptimizationManopt.jl@1.0.0 so i can use the interface from Optimization.jl.

1 Like

If that works, that is of course great :slight_smile: Just be aware it is a bit rough around the edges.

And for the error above maybe consider openening an issue with Optimization.jl as well. Maybe the last version bump (to 1.1.1) introduced that.

1 Like