Skip to content

Review feedback #82

@odow

Description

@odow

The purpose of this issue is to collate and discuss user feedback.

Layout

Predictors all live in
https://github.com/lanl-ansi/MathOptAI.jl/tree/main/src/predictors

Extensions live in
https://github.com/lanl-ansi/MathOptAI.jl/tree/main/ext

Documentation

The docs can be difficult to build, because it requires a PyTorch installation via CONDA.

You might need to uncomment:

# julia> ENV["JULIA_CONDAPKG_BACKEND"] = "Current"

Otherwise, you'll need to make do with reading the source until I can set up CI (we need the repo to be public first).

Here's a good tutorial intro:
https://github.com/lanl-ansi/MathOptAI.jl/blob/main/docs/src/tutorials/mnist.jl

The predictors all have doctrings and examples

"""
Affine(
A::Matrix{Float64},
b::Vector{Float64} = zeros(size(A, 1)),
) <: AbstractPredictor
An [`AbstractPredictor`](@ref) that represents the affine relationship:
```math
f(x) = A x + b
```
## Example
```jldoctest
julia> using JuMP, MathOptAI
julia> model = Model();
julia> @variable(model, x[1:2]);
julia> f = MathOptAI.Affine([2.0, 3.0])
Affine(A, b) [input: 2, output: 1]
julia> y = MathOptAI.add_predictor(model, f, x)
1-element Vector{VariableRef}:
moai_Affine[1]
julia> print(model)
Feasibility
Subject to
2 x[1] + 3 x[2] - moai_Affine[1] = 0
julia> y = MathOptAI.add_predictor(model, MathOptAI.ReducedSpace(f), x)
1-element Vector{AffExpr}:
2 x[1] + 3 x[2]
```
"""

Return structs

Read #67 and #80. Thoughts, comments, and ideas?

Comparison to existing projects

Read https://github.com/lanl-ansi/MathOptAI.jl/blob/main/docs/src/developers/design_principles.md. Have I misrepresented anything, or left anything out?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions