forked from dotnet/infer
-
Notifications
You must be signed in to change notification settings - Fork 0
Fusion upstream #7
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
Merged
Merged
Conversation
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
* BayesPointMachineClassifier.LoadBackwardCompatibleBinaryClassifier and SaveForwardCompatible use text or binary depending on the file extension * Added IWriter and IReader, WrappedBinaryWriter, WrappedBinaryReader, WrappedTextWriter, WrappedTextReader * Changed uses of BinaryWriter to IWriter * Changed uses of BinaryReader to IReader * LearnersTests uses same xunit version as other tests
…blic. (#376) * Added Variable.Max(int,int). * Compiler warns about excess memory consumption in more cases when it should, and fewer cases when it shouldn't. * TransformBrowser shows attributes by default. * Updated FactorDocs
BinaryNativeClassifierMapping and MulticlassNativeClassifierMapping serialize labels as strings. Incremented CustomSerializationVersion for each. BinaryNativeClassifierMapping does not serialize labels when TLabel is bool. IReader.ReadObject is generic.
Remove clean up tasks as they are failing and not required due to switch to hosted pool build VMs
Switch release build to ubuntu-latest (#383)
Switch release build to pool MicroBuild2022-1ES
…e other pseudocount is always 1 (#386) * ShowFactorManager shows more patterns * Tidy up code
* DefaultFactorManager allows deterministic factors to have Full support * DefaultFactorManager puts each factor on a separate line * docs README mentions ShowFactorManager
* Inferred constant variables are not inlined * Added Factor.ProbLessThan, ProbBetween, Quantile, Integral, Apply. * ModelCompiler handles Delegate-valued variables. * RatioGaussianOp handles ratio instead of ProductOp. * ExpOp_Slow and LogOp_EP can compute derivatives * Refactored ConstantFoldingTransform out of ModelAnalysisTransform * CodeBuilder.MethodRefExpr takes arguments. * Added VariableInformation.NeedsMarginalDividedByPrior and CodeRecognizer.NeedsMarginalDividedByPrior * MessageTransform does not use a distribution for the forward message of a constant.
* Rename netcoreapp3.1 to net5.0 in all files * Remove references to Microsoft.NET.Sdk.WindowsDesktop * WinForms/WPF examples use net5.0-windows
1. Implementation of `SequenceDistribution` (of which `StringDistribution` specialization is most important) uses the curiously recurring template pattern (https://en.wikipedia.org/wiki/Curiously_recurring_template_pattern) by specifying the `TThis` template parameter. In places where `SequenceDistribution` creates new instances it uses the `new TThis()` which goes through the `Activator.CreateInstance<>` method which is very slow. To avoid this a special helper - `Util.New<T>` is introduced which uses a code generation at runtime trick: https://stackoverflow.com/a/1280832 which is at least an order of magnitude faster that what compiler does. 2. `CollectionElementMappingInfo.ElementMapping` is switched from List of lists to List of read only arrays. This brings 2 performance benefits: a) there is less indirection when reading the element mapping and b) the common mappings can be cached and reused now.
* RpropBufferData.EnsureConvergence = false * GetJaggedItemsOp and GetItemsFromJaggedOp use IReadOnlyList
Reduced the number of false "excess memory" warnings from GateTransform.
* Expanded CausalityExample * Variable.Dirichlet and Discrete check the array size * IterativeProcessTransform ensures Marginal methods have unique names * DependencyGraph.initializedEdges overrides required edges * DependencyAnalysisTransform requires gated definitions to fully precede their uses
* VectorGaussian.SetToRatio correctly enforces forceProper * BeliefPropagationGateEnterPartialOp.ValueAverageConditional double-checks for conflicting values * Added ReplicateOp_Divide_NoInit * PlusProductHierarchyTest is OpenBug * MatrixVectorProduct has optional check * Deterministic gates track the number of cases
Bumps [Newtonsoft.Json](https://github.com/JamesNK/Newtonsoft.Json) from 11.0.2 to 13.0.1. - [Release notes](https://github.com/JamesNK/Newtonsoft.Json/releases) - [Commits](JamesNK/Newtonsoft.Json@11.0.2...13.0.1) --- updated-dependencies: - dependency-name: Newtonsoft.Json dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…urce (#411) In our project these 2 methods are very hot. They are near-optimal algorithmically but implementation wasn't efficient due to use of convenient abstractions and JIT in netframework4.7.2 being not very sophisticated. (dotnet7 optimizes original code a lot better, but due to various reasons we can't migrate to it yet). List of micro-optimizations in no particular order: - ReadOnlyArray<> now returns values by reference - It means it can't implement IReadOnlyList<> interface anymore. But it wasn't used through interface anywhere anyway - GenerationalDictionary<> now accesses hash-table cells by reference - GenerationalDictionary.GetOrAdd() method added which replaces 2 calls to TryGetValue()+Add() - Automaton.Builder now manages its dynamically growing arrays on its own instead of using List<>. This reduces indirection and allows to access elements by reference - Automaton.Transition.ElementDistribution is not Option<TElementDistribution> anymore. Boxing of element distribution into Option<> was not optimized out by JIT. - New API is a little less safe (because this property can be used only for non-epsilon transitions) but more efficient. - Transition.OptionalElementDistribution property was added for non-performance critical parts of the code. - StringManipulator is now a struct (value type). It allows to monomorphize generic class and inline calls to its methods. With classes (reference types) calls had to be dynamically dispatched. - Automaton.Product() and TransducerBase.ProjectSource() were rewritten without use of StateCollection, State and ReadOnlyArraySegment<> types. These types provided convenient APIs but JIT was not ablet to eliminate their overhead. This PR speeds up methods mentioned in PR title by about 30%.
* MMath.Max, Min, Median throw InvalidOperationException on empty sequences. * Increased precision of MaxGaussianOp. * InnerProductArrayOp.AAverageConditional handles innerProduct near uniform. * MaxOfOthersOp has internal flag for Monte Carlo.
* QuantileEstimator throws on NaN arguments
* Disable warning for usage of WebClient in Evaluator * vmImage: windows-latest * Adjust to new DeflateStream behaviour in .NET 6
Support null values in PropertiesToString
Return negative infinity in logsumexp on empty input
* Improved accuracy of Gamma.FromDerivatives
* ModelCompiler handles checked expressions * StocAnalysisTransform replaces constraint assignments with Constrain.Equal * Fixed VariablePointOpBase.LogEvidenceRatio * Fixed ConstrainEqualOp.AverageLogFactor
…checked arithmetic) (#426) Co-authored-by: Tom Minka <8955276+tminka@users.noreply.github.com>
Add .net6.0-windows as a target so that Visualizer features are available on .NET 6.0 when targeting Windows (while preserving the cross-platform net6.0 target). I have changed our minimum .NET 4xx dependency from net462 to net472 because this is the minimum version supported by the version of the automatic graph layout package that supports net6.0-windows. It is possible to still use net462 and in this case to use the previous version of automatic graph layout; but the increased complexity doesn't seem worth it.
# problem The way the ".pdb" is specified currently doesn't work for projects with multiple target platforms (OutDir is not populated). # solution Override the way we do it for other projects, and add entries for each target platform we have.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.