- 
                Notifications
    You must be signed in to change notification settings 
- Fork 230
          Update variational inference interface to match [email protected]
          #2699
        
          New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
          
     Open
      
      
            Red-Portal
  wants to merge
  17
  commits into
  breaking
  
    
      
        
          
  
    
      Choose a base branch
      
     
    
      
        
      
      
        
          
          
        
        
          
            
              
              
              
  
           
        
        
          
            
              
              
           
        
       
     
  
        
          
            
          
            
          
        
       
    
      
from
bump_advancedvi_0.5
  
      
      
   
  
    
  
  
  
 
  
      
    base: breaking
Could not load branches
            
              
  
    Branch not found: {{ refName }}
  
            
                
      Loading
              
            Could not load tags
            
            
              Nothing to show
            
              
  
            
                
      Loading
              
            Are you sure you want to change the base?
            Some commits from the old base branch may be removed from the timeline,
            and old review comments may become outdated.
          
          
  
     Open
                    Changes from all commits
      Commits
    
    
            Show all changes
          
          
            17 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      ea69430
              
                update vi interface to match [email protected]
              
              
                Red-Portal 86ee6dd
              
                revert unintended commit of `runtests.jl`
              
              
                Red-Portal 5ceb7e6
              
                CompatHelper: add new compat entry for DynamicPPL at version 0.38 for…
              
              
                github-actions[bot] 3e30e04
              
                Merge branch 'breaking' of github.com:TuringLang/Turing.jl into bump_…
              
              
                Red-Portal d870045
              
                update docs for `vi`
              
              
                Red-Portal 2d928e0
              
                add history entry for `[email protected]`
              
              
                Red-Portal 5211b37
              
                remove export for removed symbol
              
              
                Red-Portal f0d615d
              
                fix formatting
              
              
                Red-Portal 1b2351f
              
                fix formatting
              
              
                Red-Portal 2be31b4
              
                tidy tests advi
              
              
                Red-Portal e48ae42
              
                fix rename file `advi.jl` to `vi.jl` to reflect naming changes
              
              
                Red-Portal 44f7762
              
                fix docs
              
              
                Red-Portal fd0e928
              
                fix HISTORY.md
              
              
                Red-Portal 77276bd
              
                fix HISTORY.md
              
              
                Red-Portal cb1620c
              
                Merge branch 'main' of github.com:TuringLang/Turing.jl into bump_adva…
              
              
                Red-Portal e70ddb4
              
                update history
              
              
                Red-Portal 115802d
              
                Merge branch 'bump_advancedvi_0.5' of github.com:TuringLang/Turing.jl…
              
              
                Red-Portal File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
          Some comments aren't visible on the classic Files Changed page.
        
There are no files selected for viewing
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -1,5 +1,55 @@ | ||
| # 0.42.0 | ||
|  | ||
| ## Breaking Changes | ||
|  | ||
| **AdvancedVI 0.5** | ||
|  | ||
| Turing.jl v0.42 updates `AdvancedVI.jl` compatibility to 0.5. | ||
| Most of the changes introduced in `[email protected]` are structural, with some changes spilling out into the interface. | ||
| The summary of the changes below are the things that affect the end-users of Turing. | ||
| For a more comprehensive list of changes, please refer to the [changelogs](https://github.com/TuringLang/AdvancedVI.jl/blob/main/HISTORY.md) in `AdvancedVI`. | ||
|  | ||
| A new level of interface for defining different variational algorithms has been introduced in `AdvancedVI` v0.5. As a result, the function `Turing.vi` now receives a keyword argument `algorithm`. The object `algorithm <: AdvancedVI.AbstractVariationalAlgorithm` should now contain all the algorithm-specific configurations. Therefore, keyword arguments of `vi` that were algorithm-specific such as `objective`, `operator`, `averager` and so on, have been moved as fields of the relevant `<: AdvancedVI.AbstractVariationalAlgorithm` structs. | ||
| For example, | ||
|  | ||
| ```julia | ||
| vi(model, q, n_iters; objective=RepGradELBO(10), operator=AdvancedVI.ClipScale()) | ||
| ``` | ||
|  | ||
| is now | ||
|  | ||
| ```julia | ||
| vi( | ||
| model, | ||
| q, | ||
| n_iters; | ||
| algorithm=KLMinRepGradDescent(adtype; n_samples=10, operator=AdvancedVI.ClipScale()), | ||
| ) | ||
| ``` | ||
|  | ||
| Similarly, | ||
|  | ||
| ```julia | ||
| vi( | ||
| model, | ||
| q, | ||
| n_iters; | ||
| objective=RepGradELBO(10; entropy=AdvancedVI.ClosedFormEntropyZeroGradient()), | ||
| operator=AdvancedVI.ProximalLocationScaleEntropy(), | ||
| ) | ||
| ``` | ||
|  | ||
| is now | ||
|  | ||
| ```julia | ||
| vi(model, q, n_iters; algorithm=KLMinRepGradProxDescent(adtype; n_samples=10)) | ||
| ``` | ||
|  | ||
| Additionally, | ||
|  | ||
| - The default hyperparameters of `DoG`and `DoWG` have been altered. | ||
| - The deprecated `[email protected]`-era interface is now removed. | ||
|  | ||
| # 0.41.0 | ||
|  | ||
| ## DynamicPPL 0.38 | ||
|  | ||
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              This file was deleted.
      
      Oops, something went wrong.
      
    
  
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
      
      Oops, something went wrong.
        
    
  
      
      Oops, something went wrong.
        
    
  
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Uh oh!
There was an error while loading. Please reload this page.