Initial suggestion for proposed feature to match git describe

In response to issue #67 this branch/PR is an initial suggestion on a general direction that could be taken in order to resolve the issue and any others (such as issue #66) where users are anticipating the versionName to more closely match the output of the git describe command.

Thanks!
A few areas of concern:

matchGitDescribe = true will break which other options?
Some projects have different kinds of tags present. Will git.describe fall back to a non-versioning tag and will that break versionCode as well?
How would you feel about adding %describe% as an option in format?

The first question has a longer answer than I can respond to quickly, so I'll hop over that one for now.

git describe by default only finds annotated tags and allowing for all tags is as easy as 'git describe --tags'. Additionally, you can pass in a regex for it to match on only some tags. (Some of this takes us into where/why I had assumed your were using git describe to begin with, so I wonder if by using it we'll be able to get rid of some the code in here doing what it already does...)

I'm completely open on any/all of this, really. I threw this together as quickly as I could to get the conversation started.

Here are the differences I currently see when matchGitDescribe is on (with the current pull approach).

format is ignored (but this is as expected)
commitHashLength is ignored,  git.describe returns a fixed length for the commit
tagPattern is ignored. git.describe can take patterns but they are globs unlike tagPattern which is a regex.
onlyIn is ignored - git.describe() doesn't have an option like this. It's a pretty targeted use case though: calculating versions only from a subset of the commit tree. Maybe this feature should be deprecated?
prefix is ignored (but perhaps this could be globbed back in, e.g. git.describe().setMatch(prefix + "*")
untrackedIsDirty is ignored (but could be added back on?)
codeFormat is broken because revcount will not match or git.describe might even find a different tag...this is a big deal -- we would probably need to parse out chunks of the result from git.describe() to fix this.

Smoothing all of those things out while being limited to the current git.describe is probably not possible. So fixing #67 in this way will break most of the rest of plugin, OR it will be necessary to re-implement the algorithm in https://git.eclipse.org/c/jgit/jgit.git/tree/org.eclipse.jgit/src/org/eclipse/jgit/api/DescribeCommand.java while retaining support for current configuration options. I think the latter is a better approach but obviously it's more work.
I do like the idea of the change though, and in fact it would be best to have it as the default behavior so we wouldn't need an option for it at all.

I'm not sure I agree that smoothing things out isn't the better way to go. Even with format, I personally never saw this as wanting to ignore format and simply match git describe instead. My main intent has been to suggest that the initial "base calculation" of the string could be done with git describe and then build off of that (such as tacking on untrackedIsDirty, as you mentioned).
I agree the following should be reasonably doable: tagPattern, prefix, untrackedIsDirty. So that's 3.
For the other 4, I can only comment with my personal opinions (which I hope to demonstrate as compelling arguments), but this isn't my baby, so obviously feel free to ignore me when I say I don't see much loss if you were to get rid of format, commitHashLength, and onlyIn. Here's why:

format Allow me to sort of contradict my opening statement. No, I didn't set out to get rid of this option, but yes I do hope to argue that matching git describe is so helpful that one would only be doing a disservice by drastically changing the format away from it. Prepend and/or append all you want, but keep that core intact so it can be quickly/easily copy/pasted. Just my two cents.
commitHashLength I'm not a super expert at the exact internals of git, but if I'm not mistaken, this isn't actually fixed but can vary depending on the size of the repo. I believe it calculates how many characters it needs to print in the short hash and still be guaranteed unique. So while it starts at 7 for small repos, I believe as more and more objects (commits/tags/branches) are added to the database then as collisions become more likely it begins to use 8, and then 9, and so on. With that in mind - given git describe is doing the hard part and ensuring the hash is sufficiently long - I don't see much need for choosing a custom length.
onlyIn Agreed, deprecation may be the way to go as I've always felt like the codebase (and therefore the version) should be considered different, no matter what you change.

Finally, that brings us to codeFormat. My initial thoughts/reaction will likely turn into a larger discussion related to this code comment which mentions issue #34, so I think I may just ask some clarifications on that issue to see if I understand the line of reasoning correctly. But, the short of it is, I do have some ideas around how it may actually be good and useful to allow codeFormat not to match. More on that later.

I think the hardest problems are these:

codeFormat has to match. It's a showstopper defect to hl emit a name of 1.3.4 and code number of 1002006.
I have a project that relies on onlyIn, so it's hard for me to want to drop it!
I don't see a way to make tagPattern work. Do you?
The flexibility of format is a big reason to have this plugin in the first place. (Without it, it's better to just invoke git.describe() directly from build.gradle.)

Again, all of these issues can be worked around if the plugin implements its own revcount implementation to act more like the command-line version of git describe.

codeFormat is absolutely critical. I completely agree. What I've seen in the past is we had a version name of 1.3.4-200 (from git describe) and that would yield 103040200 (with a custom script that was not as elegant or powerful as your plugin). The nice thing was we never had to worry about versionCode, but the really terrible part was it was way too easy for a subsequent release just a few weeks later to become 1.3.4-542 and therefore the versionCode jumped from 103040200 to 103040542. It doesn't take long to see how easily we were in danger of making "too many commits" in between releases (because 1.3.4-9999, however unlikely it may have been, was technically a possibility and just one commit away from breaking things when 1.3.4-10000 became 103050000).
So, what was the solution? "Just add more buffer and make room for 5 digits at the end." Well, now we were making hops that are even more enormous, wastefully guzzling up valid versionCode values - and all "just in case".
Alright, so what am I getting at? Well, the implementation I've described above took things to an extreme, and it was overkill to always increment versionCode by N simply because N commits were added. And so what I've started to think about just within the past week or so is maybe a concept similar to onlyIn could come in handy here.
I think it would be incredibly useful to only modify that last part of the versionCode for each merge commit into the release branch. I'll attempt to demonstrate via diagrams. I hope this makes sense.
Here's what my old project basically had:
     100300400    100300405  100300409  100300413
       1.3.4           X         Y         Z
release: *-------------*---------*---------*
          \           / \       / \       /
hotfixes:   *--*--*--*   *--*--*   *--*--*
            a  b  c  d   e  f  g   h  i  j

a = 1.3.4-1 and 100300401
b = 1.3.4-2 and 100300402
c = 1.3.4-3 and 100300403
d = 1.3.4-4 and 100300404
X = 1.3.4-5 and 100300405
...
j = 1.3.4-12 and 100300412
Z = 1.3.4-13 and 100300413

But here's what I'm starting to think might work:
     100300400    100300401  100300402  100300403
       1.3.4           X         Y         Z
release: *-------------*---------*---------*
          \           / \       / \       /
hotfixes:   *--*--*--*   *--*--*   *--*--*
            a  b  c  d   e  f  g   h  i  j

a = 1.3.4-1 and 100300400
b = 1.3.4-2 and 100300400
c = 1.3.4-3 and 100300400
d = 1.3.4-4 and 100300400
X = 1.3.4-5 and 100300401
...
j = 1.3.4-12 and 100300400
Z = 1.3.4-13 and 100300403

So where on my old project we were incrementing the versionCode by the commit distance every time, maybe it would be sufficient to only increase the final couple of digits in the versionCode by counting the number of first-parent commits since the tag. The lower-case letter commits aren't even candidates for release, so why do they need to have their versionCode bumped up?
My reasoning here would be that in all likelihood the capital letter commits are probably going to get a version bump anyway (at which point it will be 1.3.5 and 100300500). But, even if they don't, things would still work. The versionName always includes the full commit distance and the versionCode only takes into account the merge commits. Now you just have to make sure your build process never allows for releasing from a hot fix branch (which should already be in place, really).
Yes, this removes the ability to reverse map a versionCode back to a versionName, but I believe the need for that is much less common than wanting to get the versionName to take you directly/immediately back to an exact commit.

Sorry that was so lengthy. I still need to respond to your other 3 points. I'll have to do that after getting some sleep. 💤

I can take tagPattern as a bit of homework. Perhaps I've assumed too much on that being doable.
The flexibility I get. My hope (in trying to help/contribute) is to find a way to make things simpler where the plugin doesn't have to do anything that's difficult and/or tricky which git is already doing itself (such as getting a good/accurate rev count). Hopefully that means we can find a way to start with git describe output and then tack on the other stuff users need/want. In addition, it may take us down a path where we find that some techniques and paradigms don't fit but making the shift away from those will actually be better overall; I don't know.
As for onlyIn, I haven't even been able to guess how that's working to begin with, so I can't try to take that on until after tagPattern, I think.

FYI, I use onlyIn in an application project that contains a library which is also reused in other projects, so it needs its own version number, which doesn't.need to increment when the app UI changes. (git submodule is a mess and a publish/dependency workflow is slow and hard to secure.)

I know it's always annoying when someone tries to solve your problem by throwing out quick little answers without the full context...
I think if it were me I would try an integration branch.

Any and all library development must be done on the library branch
Any and all app development must be done on the app branch (with minimal exceptions noted below).
The app branch must never be merged into the library branch (else the library version would be incremented when only the app changed)
The library branch can be merged into the app branch (it's ok and even good for the app's version to increment even if only the library changed)
For any case where someone claims a "chicken/egg" problem (can't merge the library changes in until/unless the app changes and vice versa), the new library branch gets merged into the integration branch (breaking it), and the app changes are made on the integration branch. Once it's proven to be working and compatible the integration branch gets merged into the app branch.
Key point: when something is found to be broken/lacking in the integration branch and the library needs to change, never break the first rule (by changing the library directly on the integration branch). Always go back to the library branch to make that fix.

Again, my apologies if it feels like I'm tyring to direct/navigate without a full lay of the land. Hopefully this is at least somewhat helpful discussion and ideas.

I had not considered keeping a long-running branch for a separate part of a project, that's an interesting thought! Thank you for your thoughts and comments above.
Going back to this comment it strikes me that the current revcount algorithm already does exactly what you describe by counting only the merge commits. This is one reason the results differ from git describe and was the reason you opened #67.
As I noted there, I consider git describe parity a "nice to have", it is not currently a stated requirement of this project. I don't object to matching git describe, but only if it can be done in a way that doesn't break the other features currently in use. And the only way I see to do that is reimplement the version counting algorithm with sensitivity to current android-git-version features.
Key among these features is identity between the elements of versionCode and versionName. If that feature is not a requirement for your usecase I think the easiest thing to do is assign git.describe directly to your project's version name as mentioned here. You could still use the plugin for version code computation.
I think this PR has served its purpose so I'm closing it but leaving #67 open in case we find a successful way to mirror git-describe's rev counter.


Radius of points

Hi @marcomusy
pts = Points(nxpts, r=12)
sets uniform radius to all points in a graph. I would like to assign a different radius to each point.
Since r accepts a float , I wasn't sure how to get this working if I supply a list.
Could you please help me with this?

Points object cannot accept an array as radii because r is expressed in nr of screen pixels.
In you case you need to use Spheres:
https://vedo.embl.es/content/vedo/shapes.html?highlight=spheres#vedo.shapes.Spheres

Hi @marcomusy
Thank you. I tried the following
r = [0.02, 0.02, 0.02, 0.02, 0.02, 0.2, 0.02, 0.02, 0.02, 0.02]
colors = ['r', 'g', 'b', 'r', 'g', 'b', 'r', 'g', 'b', 'k']
pts = Spheres(nxpts, r=r, c=colors)

but this causes runtime error. Radii works good but the colors don't work for some reason.

It's only either radii or colors- not both.. it's limitation i'm afraid.
If the nr of spheres you want to draw is less than about 1k I suggest you use Sphere instead of Spheres in a loop.

It's only either radii or colors- not both.. it's limitation i'm afraid.

Thanks a lot for the clarification. In that case, may I know if it would be possible to enable a feature that will allow the user to vary the alpha of each sphere. This will help in specifying a list of colors and vary the transparency of the spheres that have to be highlighted from the others instead of varying the radii.
I'm also facing an issue while specifying the labels for spheres (this works fine for Points).
labs = pts.labels(label, scale=5, font='VictorMono', c='k').addPos(0.05, 0, 0.5)
txt_lab = str(arr[i])
IndexError: list index out of range

If you are using the Sphere class instead of Spheres you already can set individual transparencies with sph.alpha() as these are individual meshes.

Unfortunately, I couldn't successfully use Sphere
I tried
G = nx.gnm_random_graph(n=10, m=15, seed=1)
nxpos = nx.spring_layout(G, dim=3, seed=1)

nxpts = [nxpos[pt] for pt in sorted(nxpos)]
nx_lines = [(nxpts[i], nxpts[j]) for i, j in G.edges()]
print(nxpts)
sph = Sphere(nxpts, r=12, c=['r', 'g', 'g', 'g', 'g', 'g', 'g', 'g', 'g', 'g']) #setting uniform radius, coloring different
sph.alpha([1, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5])
edg = Lines(nx_lines).lw(4)

    self.SetPosition(pos)
TypeError: SetPosition argument %Id: %V

However, sph = SphereS(nxpts) works for Spheres.
Could you please suggest how the position argument has to be set?

..no you cannot! Sphere is an individual Mesh object so it should be used in a loop to create multiple ones, e.g.:
cols = ['r', 'g', 'g', 'g', 'g', 'g', 'g', 'g', 'g', 'g']
spheres = [Sphere().color(c).pos(np.random.randn(3)) for c in cols]
show(spheres)

Thanks Marco,
So I understand I must be creating spheres in following way
spheres = [Sphere().color(c).pos(np.random.randn(3)) for c in cols]
and then do
show(spheres,
     edg,
     )

to display the network graph.

Yes - correct!


Cannot add non-admin user to Admin group

Terraform Version
terraform 0.11.10
artifactory provider version 1.4.3
Affected Resource(s)

artifactory_user

Terraform Configuration Files
Assuming Admins group is already created and Readers has  Automatically Join New Users to this Group enabled.
module "artifactory_admin" {
  source                = "../../../../modules/artifactory/user"
  username              = "artifactory-admin"
  email                 =<EMAIL_ADDRESS>  enable_profile_update = true
  disable_ui_access     = true

  groups = [
    "Admins",
    "Readers",
  ]
}

Debug Output
Panic Output
using cached credentials for production...
module.artifactory_admin.artifactory_user.this: Modifying... (ID: artifactory-admin)
  disable_ui_access: "false" => "true"

Error: Error applying plan:

1 error(s) occurred:

* module.artifactory_admin.artifactory_user.this: 1 error(s) occurred:

* artifactory_user.this: POST https://*********.jfrog.io/************/api/security/users/artifactory-admin: 400 [{Status:400 Message:The user is associated with one or more groups with admin privileges. To disablethe admin privileges, remove the user from all relevant groups.}]

Terraform does not automatically rollback in the face of errors.
Instead, your Terraform state file has been partially updated with
any resources that successfully completed. Please address the error
above and apply again to incrementally change your infrastructure.

Expected Behavior
artifactory_admin user be member of the both groups.
Actual Behavior
TF plan fails with an 400 error. User membership not changed.
Steps to Reproduce
Try to create a resource as below TF code snippet.
Important Factoids
It works just fine when manually done via WEB UI.
References
May be relevant: https://www.jfrog.com/jira/browse/RTFACT-14864

Closed.


Add Worley noise

https://en.wikipedia.org/wiki/Worley_noise

ok it turns out that Worley noise and Voronoi noise are the same thing. I am very smart. See #1


Fix didScrollToDateSegmentWith not called when dragging

Hi,
I experienced an issue with the didScrollToDateSegmentWith delegate in my current setup.
I am using a single line calendar with bounce disabled (infinite scrolling)
The method is not called, when the user drags the calendar strip, because the scrollview is never decelerating.
I added a new delegate method called func calendar(_ calendar: JTAppleCalendarView, didDragToDateSegmentWith visibleDates: DateSegmentInfo) that closes this gap. In the UIScrollviewDelegate I implemented the scrollViewDidEndDragging  method and I check for willDecelerate. Only if willDecelerate is false, the user actually dragged and released the touch at a fixed position, otherwise we continue and didScrollToDateSegmentWith is called after finishing animating.

Fails on some test, I don't know why, library is working though

Yea dont worry about the tests.
I have to update those.
I've been so busy creating the library that I have slacked a bit on the tests.
I'll look at your problem/solution over the weekend.

Hi, did you find the time to look at it? Should we improve something?

finally got the time to look at this.
Only thing i will change is
    public func scrollViewDidEndDragging(_ scrollView: UIScrollView, willDecelerate decelerate: Bool) {
        // Only call the delegate, when not decelerating
        // otherwise, didScrollToDateSegmentWith is called
        // after finishing animation
        if !decelerate {
            visibleDates {[unowned self] dates in
                self.calendarDelegate?.calendar(self, didScrollToDateSegmentWith: dates) // I will change this
            }
        }
    }

I will change the code above and not introduce a new function since i think the developer. let me know what you think.


Display total resolution when using xrandr

Features
Displays total display resolution when using xrandr, similar to xwininfo, xdpyinfo. Individual displays are included in par
Issues

Runs xrandr command an extra time

To Do

Only display if there are multiple monitors (count number of connected monitors?)
Toggle to allow hiding of individual monitor details

If there’s one monitor the output should be the full resolution. I don’t understand this change.

Sorry, should have included screenshots. With multiple monitors, you don't see your total display resolution.
Current build, using xrandr:

Current build, using xwininfo and xdpyinfo:

Proposed change:

This is intended behaviour is it not? What’s the use case in seeing the total area?

I understand this change. This could come in handy to show to others we have actually 4 1080p screens giving the total resolution.
And since neofetch's main purpose is to showcase our current config in a neat and concise way, I understand this PR.
Maybe rebasing to make only one commit could be nice @cstok :)

I won’t be merging this as it requires too much code. I’ll work on implementing this with a single xrandr call.


Typo Fix

https://github.com/MicrosoftDocs/OfficeDocs-SkypeForBusiness/issues/2420

@nenonix @JohanFreelancer9 Copy editing is needed for this PR. Thanks.

@MarcLauinger - for your review.

@LolaJacobsen PR has been copyedited and is ready for final review, could you please check and merge? Thanks!

@LolaJacobsen PR has been copyedited and is ready for final review, could you please check and merge? Thanks!


introducing doctests for tensor methods and inv

This PR aims to introduce doctests for tensor methods and inv in the linalg.jl. This will help users in using these methods which might go unnoticed.  I am looking for your feedback and comments! Thanks for your help reviewing the PR!

Thanks, these are pretty useful! I deleted a couple of them as I am trying to have a separation between "doctests" which exist for the purpose of documentation (and are just incidentally tested, for consistency of the examples when changes are made in the future) and proper tests which exit for testing and do not need to be neat / short / clean as expected of documentation examples.


Problem on upload image

Hi
I got a problem with image uploading, Imagemagick is also installed.
[2018-11-08T15:11:02.687Z] ERROR: your-priorities/6719 on mardom.foundation:
    Image Error { context: 's3UploadClient',
      image: null,
      user: null,
      err:
       { Error: Command failed: identify -format "name=
    size=%[size]
    format=%m
    colorspace=%[colorspace]
    height=%[height]
    width=%[width]
    orientation=%[orientation]
    " uploads/0962cc7a51048c62259ac7041b588ff1
    identify: no decode delegate for this image format `' @ error/constitute.c/ReadImage/556.

        at ChildProcess.exithandler (child_process.js:275:12)
        at emitTwo (events.js:126:13)
        at ChildProcess.emit (events.js:214:7)
        at maybeClose (internal/child_process.js:925:16)
        at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
         killed: false,
         code: 1,
         signal: null,
         cmd: 'identify -format "name=\nsize=%[size]\nformat=%m\ncolorspace=%[colorspace]\nheight=%[height]\nwidth=%[width]\norientation=%[orientation]\n" uploads/0962cc7a51048c62259ac7041b588ff1' },
      errorStatus: 500 }
::ffff:<IP_ADDRESS> - - [08/Nov/2018:15:11:02 +0000] "POST /api/images?itemType=user-header HTTP/1.1" 500 21 "http://x.x.x.x:4242/domain/1" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:63.0) Gecko/20100101 Firefox/63.0"

any Idea?

@thelematic I'm not sure, its an error from the identify command - found this on StakOverflow: https://stackoverflow.com/questions/9586048/imagemagick-no-decode-delegate and https://stackoverflow.com/questions/9144402/rspec-paperclip-identify-no-decode-delegate-for-this-image-format

@rbjarnason  I found that this problem is cuz of Imagemagick dependency for libjpeg.
so I installed libjpeg-dev and it works now

@thelematic Great :)


Incorrect predictions while exporting keras model to android

I trained the Keras model on State Farm Distracted Driver Dataset and exported it to .pb graph file with the code given below:
def export_model(saver, model, input_node_names, output_node_name):
    tf.train.write_graph(K.get_session().graph_def, 'out', \
        MODEL_NAME + '_graph.pbtxt')

    saver.save(K.get_session(), 'out/' + MODEL_NAME + '.chkp')

    freeze_graph.freeze_graph('out/' + MODEL_NAME + '_graph.pbtxt', None, \
        False, 'out/' + MODEL_NAME + '.chkp', output_node_name, \
        "save/restore_all", "save/Const:0", \
        'out/frozen_' + MODEL_NAME + '.pb', True, "")

    input_graph_def = tf.GraphDef()
    with tf.gfile.Open('out/frozen_' + MODEL_NAME + '.pb', "rb") as f:
        input_graph_def.ParseFromString(f.read())

    output_graph_def = optimize_for_inference_lib.optimize_for_inference(
            input_graph_def, input_node_names, [output_node_name],
            tf.float32.as_datatype_enum)

    with tf.gfile.FastGFile('out/opt_' + MODEL_NAME + '.pb', "wb") as f:
        f.write(output_graph_def.SerializeToString())

    print("graph saved!")

The problem is when I run that exported model on android, it always predicts wrong classes. The same code below predicts the correct labels when given .pb file of model trained on MNIST Dataset from source..
public class MainActivity extends AppCompatActivity {
    ImageView imageView;
    Button button1;
    TextView label;
    private static final int PixelWidth = 100;
    //private List<Classifier> mClassifiers = new ArrayList<>();
    public static final int cam_req = 999; // used in OpenCamera Function
    public Classifier c11;
    private static final int PICK_IMAGE = 1;
    Uri imageUri;
    private boolean isLoaded= true;
    private float[] imageNormalizedPixels;
    private int [] imageBitmapPixels;
    private byte[] bytearray;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        c11 = new ModelClassifier();
        loadModel();

        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        imageView = (ImageView) findViewById(R.id.imageView);
        label = (TextView)findViewById(R.id.label_output);
        button1 = (Button) findViewById(R.id.button);
        button1.setOnClickListener(new View.OnClickListener() {
                                       @Override
                                       public void onClick(View v) {
                                           openGallery();
                                       }
                                   }

        );

    }

    private void loadModel() {
        //The Runnable interface is another way in which you can implement multi-threading other than extending the
        // //Thread class due to the fact that Java allows you to extend only one class. Runnable is just an interface,
        // //which provides the method run.
        // //Threads are implementations and use Runnable to call the method run().
        new Thread(new Runnable() {
            @Override
            public void run() {
                try {
                    c11=ModelClassifier.create(getAssets(), "Keras", "opt_keras-10grey.pb", "labels.txt", PixelWidth,
                          "input_3", "softmax_1/Softmax", false);

                } catch (final Exception e) {
                    //if they aren't found, throw an error!
                    label.setText("Model not loaded");
                    isLoaded = false;
                    throw new RuntimeException("Error initializing classifiers!", e);
                }
            }
        }).start();
    }

    private void openGallery() {
        if (isLoaded) {
            Intent gallery = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.INTERNAL_CONTENT_URI);
            startActivityForResult(gallery, PICK_IMAGE);
        }

    }

    public void OpenCamera(View view) {

        if (isLoaded) {

            Intent intnt = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
            startActivityForResult(intnt, cam_req);
        }
    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent Data) {
        super.onActivityResult(requestCode, resultCode, Data);
        if (resultCode == RESULT_OK && requestCode == PICK_IMAGE) {

            try {
                final Uri imageUri = Data.getData();
                final InputStream imageStream = getContentResolver().openInputStream(imageUri);
                final Bitmap selectedImage = BitmapFactory.decodeStream(imageStream);
                ImageView imageView = (ImageView) findViewById(R.id.imageView);
                imageView.setImageBitmap(selectedImage);
                imageView.invalidate();
                BitmapDrawable drawable = (BitmapDrawable) imageView.getDrawable();

                Bitmap image = Bitmap.createScaledBitmap(selectedImage, PixelWidth, PixelWidth, false);

                float [] pixels = getPixels(image);

                if (pixels!=null) {
                    System.out.println("It is gallery image");

                    final Classification returned = c11.recognize(pixels);
                    System.out.println("this is the predicted class: "+returned.getLabel());
                    label.setText(returned.getLabel());

                }

            } catch (FileNotFoundException e) {
                e.printStackTrace();
            }

   }

    public float[] getPixels(Bitmap bitmap)
    {

        // Get 100x100 pixel data from bitmap
        int[] pixels = new int[PixelWidth * PixelWidth];
        bitmap.getPixels(pixels, 0, bitmap.getWidth(), 0, 0, bitmap.getWidth(), bitmap.getHeight());

        float[] retPixels = new float[pixels.length];
        for (int i = 0; i < pixels.length; ++i) {
            // Set 0 for white and 255 for black pixel
            int pix = pixels[i];
            retPixels[i] = pix /255f;
        }
        return retPixels;
    }

    }

ModelClassifier.java class is given below:

public class ModelClassifier implements Classifier {

    private static final float THRESHOLD = 0.1f;
    private TensorFlowInferenceInterface tfHelper;

    private String name;
    private String InputName;
    private String OutputName;

    private int inputsize;

    private boolean feedKeepProb;

    private List<String> Labels;
    private float[] Output;

    private String OutputNames[];

   /*public  ModelClassier(Context a){
       Intent a1=a;
    }*/

    private static List<String> readLabels(AssetManager am, String fileName) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(am.open(fileName)));

        String line;
        List<String> labels = new ArrayList<>();
        while ((line = br.readLine()) != null) {
            labels.add(line);
        }

        br.close();
        return labels;
    }

    public static ModelClassifier create(AssetManager assetManager, String name,
                                         String modelPath, String labelFile, int inputSize, String inputName, String outputName,
                                         boolean feedKeepProb) throws IOException {

        ModelClassifier c = new ModelClassifier();

        c.name = name;

        c.InputName = inputName;
        c.OutputName = outputName;

        c.Labels = readLabels(assetManager, labelFile);
        System.out.println("These are the labels"+c.Labels.toString());

        c.tfHelper = new TensorFlowInferenceInterface(assetManager, modelPath);
        System.out.println("ModelPath is++++++++++" + modelPath);
        int numClasses = 10;

        c.inputsize = inputSize;

        c.OutputNames = new String[]{outputName};

        c.OutputName = outputName;
        c.Output = new float[numClasses];

        c.feedKeepProb = feedKeepProb;
        System.out.println("Model is finally loaded++++++++++");
        return c;
    }

    //@Override
    public String name() {
        return name;
    }

    @Override
    public Classification recognize(float[] pixels) {

        //using the interface
        //give it the input name, raw pixels from the drawing,
        //input size
        tfHelper.feed(InputName, pixels, new long[]{1, inputsize, inputsize, 1});

        //probabilities
        if (feedKeepProb) {
            tfHelper.feed("keep_prob", new float[]{1});
            System.out.println("Infeedprob++++++++++");
        }
        //get the possible outputs
        tfHelper.run(OutputNames);

        tfHelper.fetch(OutputName, Output);
        System.out.println("afterfetch++++++++++");
        // Find the best classification
        //for each output prediction
        //if its above the threshold for accuracy we predefined
        //write it out to the view
        Classification ans = new Classification();
        for (int i = 0; i < Output.length; ++i) {
            if (Output[i] > THRESHOLD && Output[i] > ans.getConf()) {
                ans.update(Output[i], Labels.get(i));
            }

        }

        return ans;
    }

Note that model input shape is [100,100,1]
Please tell me where I am making mistake. I have tried training on different number of classes but the outputs are completely different.

Do you have any example of model usage in Python?

It has been 14 days with no activity and the awaiting response label was assigned. Is this still an issue?

Yes. Although when I export the model through transfer learning model works fine on android. It gives completely wrong predictions on model trained above. I can't figure out what is the problem.

Apologies for the delay, @AzharSindhi is this still an issue with the latest TFLite release?

@jdduke I haven't checked it on the latest release. You can close this issue now.
Thank you


Bugfix/species filter is getting ignored in the metadata search

This is the backend PR for the integration of front-end PR - front-end
This PR integrates recently published components to get changes to modified components into SCXA.

I am not in the review list, so I will just leave my commets here.
You deleted some package-log.json files again, and your commits are unverified, and the jenkins are not passed. Please fix these. Thanks.


--export_to_resolve do not export right setting when fps value is not an Integer

(Make sure you're using the latest version) yes
What went wrong
When the fps value of the input video is not an integer(like 29.97 or 23.98), the output xml file is set to an incorrect value
The input video file is 23.98fps
but the output file settings:

frameDuration should be: 1001/24000s(in 23.98fps) and 1001/30000s(in 29.97fps)
FFVideoFormat should be: 2398(in 23.98fps) and 2997(in 29.97fps)
Causes DaVinci Resolve to not set the frame rate correctly
Thanks in advance!

--export_to_resolve is not supported anymore due to issues with finding clips. Thank you for reporting this.


frontend not finding some metrics in carbon cache. How to determine whether this is a problem with carbon-cache or if the metrics are stuck in a relay?

webapp is supposed to retrieve and display metrics that are in carbon cache's memory before they have been written to disk (in addition to the metrics that are already on disk).
I can verify this is working as expected for some of my metrics, by enabling LOG_CACHE_HITS, looking at the logs and seeing "query returned" 1+ results when I refresh my browser.  The timestamp on disk will be older, and so I know that the webapp is successfully getting the values from both disk and in-cache.
But I have other metrics that are not returning any recent values until they have been flushed to disk. In some cases, this means waiting 30+ minutes. During this wait, the log shows "query return 0 results" when I refresh my browser. Data is not lost; eventually it makes it to disk, but in the meantime the browser is showing an absence of recent data.
I've done some testing and I don't know if this is because:
(a) metrics are in carbon-cache memory but carbon-cache cannot find them
or
(b) metrics are stuck on the relay and have not made it to carbon-cache yet
How do I figure it out? And what can be done to fix it?

Update: I'm pretty sure (but not positive) the problem is with carbon-cache. I did a test where I turned off the relays and then refreshed the browser. The idea being that by turning off the relays, the data would either get flushed to carbon-cache or would disappear with the relay.
The result was that still no recent data was showing up in the browser. Until about 10 minutes later when it was written to disk. This tells me the data is being held by carbon-cache but not being given when the front-end requests it.
Is there a way to log when carbon-cache receives a new metric from the line? This way we would know for sure it is receiving the metric.
More importantly, why would it not return metrics that it has in its cache? Maybe there is an internal queue limit being hit? I'm running six instances that are processing about 2 million updates /minute.

are these "new" metrics for which a .wsp file does not exist yet? Are you querying the right cache?

@piotr1212 These are existing metrics that already have a .wsp file and I'm definitely querying the right cache.
@deniszh Well, shoot.... It sounds like adding cache-instances can help alleviate the problem, though?
Some of my metrics values do get displayed even when they haven't made it to disk yet, so it works for some of them. Does this mean the problem is with the size of the data or the  hash of the metric name?

@mwtzzz

Some of my metrics values do get displayed even when they haven't made it to disk yet, so it works for some of them.

I never saw this behavior TBH.

@deniszh Can you help me troubleshoot and fix it?

@deniszh
Here is an example of a metric that is not giving me trouble:
atlantic_exchange.request.sum_all.hosts
Here is an exampe of a metric that is giving me trouble:
atlantic_exchange.imp.demand.neptune_direct.sum_all.hosts

@mwtzzz : please check @piotr1212 comment - https://github.com/graphite-project/graphite-web/issues/629#issuecomment-396159341
Looks like you facing some different issue...

@deniszh Perhaps different, but is related. Either way, can you help me to troubleshoot it?

what is your setup? running a relay? hashing? If so make sure that carbonlink destionations in carbon config is literally equal to carbonlink_hosts in local_settings.py. No exceptions in query.log console.log or in webapp log? Which OS, Which Python version. Could you post your carbon.conf and local_settings.py online?

i'm running a relay layer using carbon-c-relay with fn1v_ch hash
no exceptions in the logs
OS: Amzn linux 2015.09
python 2.7
Here's how the carbonlink and cluster_servers destinations look in local_settings.py:
CARBONLINK_HOSTS = ["<IP_ADDRESS>:7201:2105","<IP_ADDRESS>:7202:2107","<IP_ADDRESS>:7203:2109","<IP_ADDRESS>:7204:2111","<IP_ADDRESS>:7205:2113","<IP_ADDRESS>:7206:2115"]

CLUSTER_SERVERS = ['radar-be-a.mgmt.yyy.com:8030','radar-be-b.mgmt.yyy.com:8030','radar-be-c.mgmt.yyy.com:8030','radar-be-d.mgmt.yyy.com:8030','radar-be-e.mgmt.yyy.com:8030', ... ]

Here's my carbon.conf. There are six entries (2105, 2107, etc) with cache_query_port 7201, 7202, etc.:
[cache:2105]
ENABLE_LOGROTATION = True
USER = yyy
MAX_CACHE_SIZE = inf
MAX_UPDATES_PER_SECOND = 10000
MAX_CREATES_PER_MINUTE = 3000
USE_INSECURE_UNPICKLER = False
USE_FLOW_CONTROL = True
LOG_UPDATES = False
LOG_CACHE_HITS = False
LOG_CREATES = False
LOG_CACHE_QUEUE_SORTS = False
CACHE_WRITE_STRATEGY = timesorted
WHISPER_AUTOFLUSH = False
WHISPER_FALLOCATE_CREATE = True
WHISPER_LOCK_WRITES = False
CARBON_METRIC_PREFIX = carbon.agents.radar123
CARBON_METRIC_INTERVAL = 60
ENABLE_AMQP = False
ENABLE_MANHOLE = False

ENABLE_UDP_LISTENER = False
UDP_RECEIVER_INTERFACE = <IP_ADDRESS>
UDP_RECEIVER_PORT = 0
PICKLE_RECEIVER_INTERFACE = <IP_ADDRESS>
PICKLE_RECEIVER_PORT = 2104
LINE_RECEIVER_INTERFACE = <IP_ADDRESS>
LINE_RECEIVER_PORT = 2105
CACHE_QUERY_PORT = 7201

Here are some logs that might help:
From cache.log:
Mon Jun 11 11:08:09 2018 :: CarbonLink cache-query request for atlantic_exchange.imp.demand.neptune_direct.sum_all.hosts returned 0 datapoints
Mon Jun 11 11:08:12 2018 :: Request-Cache miss [8c49f1d46f13caab4a3409ea7eeff4dc]
Mon Jun 11 11:08:12 2018 :: Data-Cache miss [e8da12dd07d2498aca62b1e42d1c829a]
Mon Jun 11 11:08:12 2018 :: Request-Cache miss [7f8cee809c167513113e667baf88e08e]
Mon Jun 11 11:08:12 2018 :: Data-Cache miss [a6fadeacec0b735c4d577bb25e7ca05e]

F

@piotr1212 I found a clue.
I decided to test each cache instance one at a time. I edited local_settings.py and got rid of five entries in CARBONLINK_HOSTS, leaving only one. I iterated through these, and when I tested CARBONLINK_HOSTS = ["<IP_ADDRESS>:7205:2113"] the data points show up for this metric and cache.log shows 25 data points are retrieved:
Mon Jun 11 20:35:56 2018 :: Request-Cache miss [8c49f1d46f13caab4a3409ea7eeff4dc]
Mon Jun 11 20:35:56 2018 :: Data-Cache miss [52fd8f9bd86cdba7ec015a07be13d28a]
Mon Jun 11 20:35:56 2018 :: Request-Cache miss [7f8cee809c167513113e667baf88e08e]
Mon Jun 11 20:35:56 2018 :: Data-Cache miss [9d471edfc61931ce1613fc64cd86df7b]
Mon Jun 11 20:35:57 2018 :: CarbonLink sending request for atlantic_exchange.imp.demand.neptune_direct.sum_all.hosts to ('<IP_ADDRESS>', '2113')
Mon Jun 11 20:35:57 2018 :: CarbonLink finished receiving atlantic_exchange.imp.demand.neptune_direct.sum_all.hosts from ('<IP_ADDRESS>', '2113')
Mon Jun 11 20:35:57 2018 :: CarbonLink cache-query request for atlantic_exchange.imp.demand.neptune_direct.sum_all.hosts returned 25 datapoints

These 25 data points correspond to the 25 minutes that have elapsed since the whisper file was last updated.
But if I put CARBONLINK_HOSTS back to its original setting:
CARBONLINK_HOSTS = ["<IP_ADDRESS>:7201:2105","<IP_ADDRESS>:7202:2107","<IP_ADDRESS>:7203:2109","<IP_ADDRESS>:7204:2111","<IP_ADDRESS>:7205:2113","<IP_ADDRESS>:7206:2115"]
It no longer can retrieve the data points.

@piotr1212 @deniszh
It's querying the wrong cache instance. It's querying 2115 instead of 2113:
Mon Jun 11 20:56:20 2018 :: Request-Cache miss [8c49f1d46f13caab4a3409ea7eeff4dc]
Mon Jun 11 20:56:20 2018 :: Data-Cache miss [b610953d155b2e73634893bc1a6b5d89]
Mon Jun 11 20:56:20 2018 :: Request-Cache miss [7f8cee809c167513113e667baf88e08e]
Mon Jun 11 20:56:20 2018 :: Data-Cache miss [0ba2e41252e01e4fab74db41b4f8b741]
Mon Jun 11 20:56:20 2018 :: CarbonLink sending request for atlantic_exchange.imp.demand.neptune_direct.sum_all.hosts to ('<IP_ADDRESS>', '2115')
Mon Jun 11 20:56:20 2018 :: CarbonLink finished receiving atlantic_exchange.imp.demand.neptune_direct.sum_all.hosts from ('<IP_ADDRESS>', '2115')
Mon Jun 11 20:56:20 2018 :: CarbonLink cache-query request for atlantic_exchange.imp.demand.neptune_direct.sum_all.hosts returned 0 datapoints

I fixed it by updating graphite-web and adding CARBONLINK_HASHING_TYPE = 'fnv1a_ch' to local_settings
and also installing pip scandir as per https://github.com/graphite-project/graphite-web/issues/1867

Cool, good to know that's solved now!
Sorry, I was busy and not able to support you, unfortunately.


Fix secret name for RCON password in proxy

Fixed secret reference name in deployment, there's no "-rcon" appended in the secret's template.

@toddejohnson can you help review this change since you introduced the original with #189

Thanks for looking at it, @toddejohnson

Looks good to me!


Standardize PR template across repos.

What changes are made in this PR?
Use the same PR template as all other Spyder repos.
Why are these changes needed?
We want our PR templates to be short and uniform.

this is a public repository, do we actually want this template here?

I don't know. I do think the current PR template is overkill though.

this is a public repository, do we actually want this template here?

Our internal template works here too imho. except for the functional safety check.


Capture isn't capturing complete file

This is on 2.15.5 - I understand this is no longer supported, but I'm hoping someone might be able to at least point me in the right direction.
Inside :update_asset_mtimes, there is this line:
manifest_content = capture("[ -e #{shared_path.shellescape}/#{shared_assets_prefix}/manifest* ] && cat #{shared_path.shellescape}/#{shared_assets_prefix}/manifest* || echo").strip

Lately, I'm finding that it's not capturing the entire manifest file, but rather the data in that file is only being partially read into manifest_content.  The actual manifest-xxxxx.json file is about 179K, and it's reading about 150K of it.  It also seems to be someone random - it will occasionally work, but usually not.
Oddly, there were no code changes between the last time this worked, and now.
Any pointers on what the issue might be?  I'd love to upgrade to 3.x, but can't quite yet, so I'd love to get this working again...

Just in case anyone else runs into this problem, the workaround I'm using for the moment is to transfer the file to the local disk, rather than using capture. Here's the complete workaround code:
namespace :deploy do
  namespace :assets do

    desc <<-DESC
      [internal] Updates the mtimes for assets that are required by the current release.
      This task runs before assets:precompile.
    DESC
    task :update_asset_mtimes, :roles => lambda { assets_role }, :except => { :no_release => true } do
      # Fetch assets/manifest contents.
      # overridden here to transfer file and read it, instead of running capture. For some reason capture was sometimes
      # truncating the data, which meant this task would fail.

      # manifest_content = capture("[ -e #{shared_path.shellescape}/#{shared_assets_prefix}/manifest* ] && cat #{shared_path.shellescape}/#{shared_assets_prefix}/manifest* || echo").strip
      manifest_content = ""
      manifest_file_exists = ('true' ==  capture("if [ -e #{shared_path.shellescape}/#{shared_assets_prefix}/manifest* ]; then echo 'true'; fi").strip)
      if manifest_file_exists
        manifest_filename = capture("ls #{shared_path.shellescape}/#{shared_assets_prefix}/manifest*").strip
        get manifest_filename, "tmp/temp_manifest.txt"
        manifest_content = File.read("tmp/temp_manifest.txt").strip
        File.delete("tmp/temp_manifest.txt")
      end

      if manifest_content != ""
        current_assets = parse_manifest(manifest_content)
        logger.info "Updating mtimes for ~#{current_assets.count} assets..."
        put current_assets.map{|a| "#{shared_path}/#{shared_assets_prefix}/#{a}" }.join("\n"), "#{deploy_to}/TOUCH_ASSETS", :via => :scp
        run <<-CMD.compact
          cat #{deploy_to.shellescape}/TOUCH_ASSETS | while read asset; do
            touch -c -- "$asset";
          done &&
          rm -f -- #{deploy_to.shellescape}/TOUCH_ASSETS
        CMD
      end
    end
  end
end

I'll be the first to admit this is super hacky, but it does indeed work...and if your deploy stops working, super hacky isn't so bad. :)

Closing the issue as it really belongs on the mailing list, but essentially I think it boils down to the way SSH works, you have one (or more, actually) channels and they receive events, for some reason it would appear that Cap 2 is failing to get all the events in the right order (the order is not guaranteed, anyway), we made the same mistake in the output handling in cap3 (actually SSHKit) where sometimes failed commands would send channel.on_request “exit-status” meaning the program terminated, however there were still on_data events coming down the wire with the output of the command, which we missed, because we assumed the channel.on_request “exit-status” meant it had finished. (I think, it's a while ago now).
Regardless, that probably sounds like nonsense, you can see a fairly clean example here - http://net-ssh.github.io/ssh/v2/api/classes/Net/SSH/Connection/Channel.html I would guess that you're seeing because the file is relatively large, that capture() is not waiting for all the on_data events before returning, because it's likely returning when it sees channel.on_request “exit-status” although there's no reason that.

Thanks a ton for your help, Lee!  I was thinking it was most likely network protocol-related (since I sometimes get different sizes transferred), and what you've described is generally consistent with what I'm seeing.
I did take a look at the capture() function you pointed to while debugging this; what I found was I would get a number of :out stream messages (seemed like 8-10 or so IIRC), then the block would complete. Based on what you've suggested, I'm thinking there was another pending set of data that maybe isn't sent to the block.  I tried to go a little deeper, looking at invoke_command, then run, and so on, but things seemed to get more complex at that point, so I started working on a workaround instead.
Given that v2 is pretty old, and I'm guessing none of this code is used in v3, and there is a reasonable workaround (above), I'm think I'm inclined to just drop it for now...if you agree, feel free to close this issue if you'd like!

Yeah, actually the issue is really strange, and as I said, we made (well, I made) the same mistake in SSHKit which backs v3. The 2x code is really, really poorly tested, and prone to failure, I'd suggest an up grade when you can. Ping me if I can help with that.


Added support for max_examples and random_seed

@cdfreeman-google

Oop, actually there are some conflicts-- @dargilboa could you take a look at the conflicted files?

@cdfreeman-google sure, sorry about that, I thought I had pulled the latest version before I made the changes. I resolved the conflicts.

@cdfreeman-google sure, sorry about that, I thought I had pulled the latest version before I made the changes. I resolved the conflicts.

no worries! thanks for the quick fix!


Remove HelveticaNeueInterface-MediumP4 from default styles

Hi, It would be nice to remove the default HelveticaNeueInterface-MediumP4 from fontFamily definition in text styles, it fails running on expo.io.
Thanks !!!

Dear outaTiME,
You can set the 'textStyle' props to rewrite fontFamily style.

Hi, yup ... it was the first thing i tried to do but doesn't work ... take a look:
<CornerLabel
  cornerRadius={66}
  alignment={'right'}
  style={{backgroundColor: 'red', height: 24, }}
  textStyle={{color: '#fff', fontSize: 12, fontFamily: 'Avenir'}}>
  PROMO
</CornerLabel>

As your wish,  'HelveticaNeueInterface-MediumP4' fontFamily style has been removed. You can upgrade to version 1.1.2

Thanks @cyqresig, works as expected !!!


Implement a significantly cheaper multi-modal base model for development/debugging runs

Burning $100s in openAI credits is impractical for people wanting to work on this in development and run hundreds of times per day for development/debug. Implementing some kind of model swapping (vercel AI, or finding openAI api compatible models) and a much cheaper multimodal model would be helpful to participation

Perhaps claude haiku as a starting place, it said 0.25$/million tokens which is like 20 times cheaper than gpt4o?


Update proof-systems

Explain your changes:

Checking https://github.com/o1-labs/proof-systems/pull/1263 does not break anything.

Explain how you tested your changes:
*
Checklist:

[ ] Dependency versions are unchanged

Notify Velocity team if dependencies must change in CI

[ ] Modified the current draft of release notes with details on what is completed or incomplete within this project
[ ] Document code purpose, how to use it

Mention expected invariants, implicit constraints

[ ] Tests were added for the new behavior

Document test purpose, significance of failures
Test names should reflect their purpose

[ ] All tests pass (CI will check this if you didn't)
[ ] Serialized types are in stable-versioned modules
[ ] Does this close issues? List them

Closes #0000

!ci-build-me

!ci-build-me

!ci-nightly-me

!ci-build-me

!ci-build-me

!ci-build-me

!ci-build-me

!ci-build-me


iExplorer - noModificationAllowed fatal error.

Hi,
Using version '4.2.9' I keep getting a fatal error in iExplorer (Edge/11). It´s "SCRIPT5022: NoModificationAllowedError". Tried various versions of jquery (1.10, 3.3.1) with the same results.  Seems to happen when trying to set "t.node.currentStyle".
I´ve set upa a stripped down version of my page with just a basic video and calling medialement with jquery to try and isolate the error. It doesn´t happen with an old lib "mejs.version = '2.19.0'; " but I can´t use that since "streching" doesn´t work and i´d have to redo the whole thing. Also tried lower versions of 4.x to no avail. Seems like a 4.x v issue.
I´m checking with iExplorer 11, everything works fine with Chrome.
Thanbks in advance for your help....

HTML:

<video style="width: 100%; height: 100%; max-height: 100%; max-width: 100%;" controls="controls" poster="http://XXXX/sites/default/files/XXX.jpg" controlslist="nodownload noremoteplayback">
<source src="http://XXXX/sites/default/files/XXX.mp4" type="video/mp4">
</video>

JS:
$(document).ready(function(){
alert("ready");
var videoElement = $('.eve-video-player video');

videoElement.mediaelementplayer({
stretching: 'fill',
enableAutosize: true,
// if set, overrides <video width>
videoWidth: -1,
// if set, overrides <video height>
videoHeight: -1,
enableAutosize: true,
});
});

I just noticed the same thing. Playing around a bit with the currentStyle property in general suggests to me that writing to any of its existing properties is not allowed, not even for those this documentation lists as "read/write". Interestingly, height is not even one of those, though ...


Reliable midgard node(s)

Overview
We havent been able to find more than 1 reliable public midgard.
We need a solution for self hosting midgard or taxistake midgard
References and additional details
n/a
Acceptance Criteria
n/a
Need By Date
No response
Screenshots/Mockups
No response
Estimated effort
No response

to add some color to this

if we don't host our own node, we can't ship thorchain until we rely on multiple public midgards nodes. it's way too easy to spin up a malicious midgard that serves malicious vault addresses. we checked with thorchain discord and they pointed us to 3 public nodes, only 1 of which is consistent and reliable.
if we do host our own node, we can trust it and don't need round-robin logic.

closed in favor of https://github.com/shapeshift/unchained/issues/474


Remove WinRT dependency for SHA1

Things left undone:

Delete the now unused ComputeSHA1() callback
from WinRTInterop.
That requires changing files in TFS-only areas.
Will be done separately.

Enable the new code path on CORERT.
Tried this. ILC (on CORERT) doesn't yet
support P/Invokes with SafeHandles in the signature.
The P/Invoke stub it generates throws an exception.
Unlike ProjectN, CoreRT also travels this code path
during the initial AssemblyBinder initialization
so letting it throw isn't an option.

Put the P/Invokes in Common corefx-style
because...

I don't anticipate any other crypto in
S.P.Corelib and this is a lot of P/Invoke
ceremony for a single-purpose function.

I'm not sure we're even striving to follow
this style in CoreRt.

The very idea of a Common directory
seems outdated in CoreRt given that
all the *.Private.dll's form one
encapsulation boundary. It seems we'd
want to remove this as it's causing
extra copies of code in the image.

I think those interop style rules
are a bad idea even on CoreFx.

The Unix veersion: CoreRt builds on Linux seems
non-functional (someone else noticed this too
https://github.com/dotnet/corert/issues/1892
though he only seems to have gotten crickets
for his trouble.)
Main purpose was to open a discussion on where
to put the implementation. Consensus seems to be
to put in the PAL (S.P.Corelib.Native).
Dependencies should do what S.S.Cryptography.Native
on CoreFx does (openssl on unix, CommonCrypto on
Mac/OSX as of this writing.)

I'm not sure we're even striving to follow this style in CoreRt.

We are following the corefx coding conventions, including PInvoke style, for corert.

CoreRt builds on Linux seems non-functional

It is green in the CI, and I am regularly building it locally as well.


export IProviders

Could the IProviders interface be included in the exported types?

done, try beta.5

thanks!


As a content editor, I want to create and edit account records so I can track how people associated with the library.

Testing notes:

[x] Accounts can be created from Accounts -> Accounts
[ ] Autocompletes for associating with Addresses and People

Created (then deleted) an account for Mr. McGillicutty. Worked lovelily -

Re autocomplete: spot-checked on several different accounts: both people & addresses speedily autocompleted.


Bug Fix : pair-collision.hxx, changing the method to check the pair_id with collisionPair.size()

Hello,
First, I'd like to thank you for your work. Here's what I think a small mistake in pair-collision.hxx I corrected.
Pull Request: Update condition to use collisionPairs.size()
Description
This pull request updates a conditional statement to use collisionPairs.size() instead of ngeoms because ngeoms is not the number of collision pairs but the number of geometry objects in geom_model.
The number of pairs can be higher than the number of geometry objects, hence this pull request.
Changes Made

Replaced static_cast<pinocchio::FrameIndex>(geom_model->ngeoms) with static_cast<pinocchio::FrameIndex>(geom_model->collisionPairs.size()) in the condition.

Testing
After building it, I tried on a small example in python and it works. I did not run unit tests after this but it builds successfully. Please, do not hesitate to tell me if I did something wrong here.
Related Issues
None
Checklist

[x] I have read the Contributing Guidelines.
[X] My code follows the code style of this project.

Thank you,
Arthur Haffemayer
PhD. Student, LAAS CNRS, Gepetto

Thanks for spotting this, @ArthurH91!


Implement further lambda verification

This PR implements two previously-unimplemented features in Fridge Verifier: (in bold)

All usages of the invokedynamic instruction will be disallowed except:

If the BSM is a member of java/lang/invoke/StringConcatFactory.
If the BSM is java/lang/invoke/LambdaMetafactory.metafactory, and:

The return type additionally is not annotated as @ApiStatus.NotExtendable.
The lambda captures are either primitive types, from a short list of acceptable JDK classes (e.g. String), or annotated with @AllowLambdaCapture.

The whitelist is currently only java.lang.String.
The annotation detection is not currently implemented.

I'll pull this in to my verifier branch (assuming that branch is still mergable...) and test it.


cryo pod should use entity storage

Description

entity storage has internal air
InsideCryoPod InsideEntityStorage that do exact same thing come on

cryo pod should just make internal air react with pipe node thats it

ok upon further investigation its different enough
not changing sechud since:

hiding in cryo is rare
can already see whos in cryo by right clicking i think


Design search and browse interface

Closing this in favor of getting-it-done implementation of #364.


DFBUGS-923: [release-4.14-compatibility] Fix security issue: Backtracking regular expressions

IMPORTANT: merge after https://github.com/red-hat-storage/odf-console/pull/1628
Fixes: https://issues.redhat.com/browse/DFBUGS-923

/test sanity-checks

/test sanity-checks

/run sanity-checks

/run sanity-checks

/run sanity-checks

run sanity-checks

/run sanity-checks

/run sanity-checks

/approve
/lgtm

/test odf-console-e2e-aws

/test odf-console-e2e-aws


EOS-16512 Implement hare setup.yaml provisioning sections

Initial implementation of setup.py to implement steps/sections required by mini-provisioner
TODO: Add rpm version check in post_install stage.
UT:
Ignore provisioner related error for now.
-bash-4.2$ sudo provisioning/setup.py --post_install
Failed to fetch data from provisioner ([Errno 2] No such file or directory: 'provisioner': 'provisioner')
-bash-4.2$ echo $?
0
-bash-4.2$ sudo provisioning/setup.py --init
2021-01-21 07:08:10: Generating cluster configuration... OK
2021-01-21 07:08:11: Starting Consul server on this node............ OK
2021-01-21 07:08:21: Importing configuration into the KV store... OK
2021-01-21 07:08:21: Starting Consul on other nodes... OK
2021-01-21 07:08:21: Updating Consul configuraton from the KV store... OK
2021-01-21 07:08:22: Waiting for the RC Leader to get elected......... OK
2021-01-21 07:08:28: Starting Motr (phase1, mkfs)... OK
2021-01-21 07:08:35: Starting Motr (phase1, m0d)... OK
2021-01-21 07:08:48: Starting Motr (phase2, mkfs)... OK
2021-01-21 07:08:54: Starting Motr (phase2, m0d)... OK
2021-01-21 07:09:08: Checking health of services... OK
Failed to fetch data from provisioner ([Errno 2] No such file or directory: 'provisioner': 'provisioner')
-bash-4.2$ echo $?
0
-bash-4.2$ provisioning/setup.py --test
Cluster status verified successfully
Failed to fetch data from provisioner ([Errno 2] No such file or directory: 'provisioner': 'provisioner')
-bash-4.2$ echo $?
0
-bash-4.2$ sudo provisioning/setup.py --cleanup
Failed to fetch data from provisioner ([Errno 2] No such file or directory: 'provisioner': 'provisioner')
-bash-4.2$ echo $?
0
-bash-4.2$ sudo provisioning/setup.py --reset
Failed to fetch data from provisioner ([Errno 2] No such file or directory: 'provisioner': 'provisioner')
-bash-4.2$ echo $?
0
-bash-4.2$ sudo provisioning/setup.py --support_bundle
Created /tmp/hare/hare_ssc-vm-c-0645.tar.gz
Failed to fetch data from provisioner ([Errno 2] No such file or directory: 'provisioner': 'provisioner')
-bash-4.2$ echo $?
0

@mssawant @knekrasov @s-arya Please review

@mssawant @knekrasov @s-arya Please review

please rename provisioning/setup.py to provisioning/hare_setup.py to avoid confusion between python setup.py.

please rename provisioning/setup.py to provisioning/hare_setup.py to avoid confusion between python setup.py.

@mssawant @knekrasov Please have a look. I have addressed review comments

@mssawant @knekrasov Please have a look. I have addressed review comments

@knekrasov @mssawant Please have a look

@knekrasov @mssawant Please have a look

@knekrasov Please have a look

@knekrasov Please have a look

@SwapnilGaonkar7 , can you post the testing output with the updated patch please?

@SwapnilGaonkar7 , can you post the testing output with the updated patch please?

@mssawant @knekrasov I have addressed all the review comments until now and also commented as done on them.
If I miss anything please let me know
Also updated description with testing output of latest code

@mssawant @knekrasov I have addressed all the review comments until now and also commented as done on them.
If I miss anything please let me know
Also updated description with testing output of latest code

@knekrasov Please have a look

@knekrasov Please have a look


Add .sch.id ccTLD and add first high school

So academic offers could cover the high school ones.

This seems to be a secondary school; this database is for post-secondary (higher education) institutions only. Closing.


Cross Platform: fix __int64 size + _Is_integral duplicatation

1 ) Under pal/inc/pal_mstypes.h __int64 was defined as long for
BIT64 while it was long long for non-BIT64.. x86, ARM?
2 ) When it is set to long it was raising another issue that struct _Is_integral<unsigned __int64> has duplicate definition.

Hi @obastemur, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!
You've already signed the contribution license agreement. Thanks!
The agreement was validated by Microsoft and real humans are currently evaluating your PR.
TTYL, MSBOT;

@dotnet-bot test Copyright Check please

(GitHub collapsed comments on outdated diff, so comment again.)
@obastemur Thanks for your update! But it conflicts with the existing fix on line 309 when building with cmake on Linux, as we have both BIT64 and PLATFORM_UNIX defined. Both line 309 and your update get rid of one specialization to fix the duplication. (I think your change is better than existing fix on line 309.)
To make this work, please either define PLATFORM_UNIX in your build and not changing this file, or replace (remove) existing fix on line 309 with your change.

@jianchun closing this for now. Once 32bit / OSX support is in the road map, perhaps there will be changes. Thanks for looking into this.


scilexer and vb_def hardcoded paths in wControls[64].h

in the included file wControls64.h and wControls.h, there are 3 instances of #include "D:/Programming/Temporary/RunTime/Classes/clsSCI/Inc/SciLexer.h", and one hardcoded path: #include "C:/Programs/Windows/CodeBase/Include/vb_Def.h"
I can fix the hardcoded path, but which version of SciLexer is needed?

Thank you very much. fixed


PLT-106: Add an executable for dumping script evaluation events

The executable does the following:

Stream and apply blocks
Periodically writes ChainPoint and LedgerState into timestamp.state files, and writes LedgerEvents into timestamp.event files
Upon restart, it looks for the latest state file, and resumes streaming from that point. If it fails (because the checkpointed block was rolled back), it then tries the second latest state file

This PR has a few placeholders (error) because the cardano-node commit is too old, but I tested it locally on a newer cardano-node commit.
The implementation of ledgerStateEvents was provided by @andreabedini (with minor modification).

Instead of a new package, I would put this as an executable in plutus-use-cases. We already have a tool in there which writes validators scripts and partial transactions on disk, so it would be logical to have another executable which does what you want.

@zliu41 Still relevant, or can I close this PR?

Still relevant, but I need to get some upstream PRs merged before working further on this.


Refactor select to open

Pull Request Test Coverage Report for Build 421

18 of 18 (100.0%)  changed or added relevant lines in 6 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.01%) to 75.438%

Totals

Change from base Build 418:
0.01%

Covered Lines:
1852

Relevant Lines:
2455

💛  - Coveralls


SparkOutOfMemoryError happens when running CometColumnarExchange

Describe the bug
We easily run into this problem when running queries with spark.comet.exec.shuffle.mode=jvm:
org.apache.spark.memory.SparkOutOfMemoryError: Unable to acquire 67108848 bytes of memory, got 65700208 bytes. Available: 65700208

org.apache.spark.memory.SparkOutOfMemoryError: Unable to acquire 67108848 bytes of memory, got 65700208 bytes. Available: 65700208
	at org.apache.spark.shuffle.comet.CometShuffleMemoryAllocator.allocate(CometShuffleMemoryAllocator.java:132)
	at org.apache.spark.shuffle.comet.CometShuffleMemoryAllocator.allocatePage(CometShuffleMemoryAllocator.java:119)
	at org.apache.spark.sql.comet.execution.shuffle.SpillWriter.initialCurrentPage(SpillWriter.java:158)
	at org.apache.spark.shuffle.sort.CometShuffleExternalSorter.insertRecord(CometShuffleExternalSorter.java:368)
	at org.apache.spark.sql.comet.execution.shuffle.CometUnsafeShuffleWriter.insertRecordIntoSorter(CometUnsafeShuffleWriter.java:278)
	at org.apache.spark.sql.comet.execution.shuffle.CometUnsafeShuffleWriter.write(CometUnsafeShuffleWriter.java:206)
	at org.apache.spark.shuffle.ShuffleWriteProcessor.write(ShuffleWriteProcessor.scala:59)
	at org.apache.spark.scheduler.ShuffleMapTask.runTask(ShuffleMapTask.scala:101)
	at org.apache.spark.scheduler.ShuffleMapTask.runTask(ShuffleMapTask.scala:53)
	at org.apache.spark.TaskContext.runTaskWithListeners(TaskContext.scala:161)
	at org.apache.spark.scheduler.Task.run(Task.scala:139)
	at org.apache.spark.executor.Executor$TaskRunner.$anonfun$run$3(Executor.scala:554)
	at org.apache.spark.util.Utils$.tryWithSafeFinally(Utils.scala:1529)
	at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:557)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.base/java.lang.Thread.run(Unknown Source)

We've observed this problem not only on our own workloads but also on TPC-H benchmarks. The above-mentioned exception happens when running TPC-H query 5 on parquet files with scale factor = 1000.
We've tried to disable the comet shuffle manager and use Spark's own shuffle exchange, all TPC-H queries could finish successfully.
Steps to reproduce
Running TPC-H query 5 on a Spark cluster. The detailed environment and spark configurations are listed in Additional context.
Expected behavior
All TPC-H queries should finish successfully.
Additional context
The problem was produced on a self-deployed K8S Spark cluster on AWS.

Driver/executor instance type: r7i.2xlarge (8 vCPUs, 64GB memory)
Executor pod resource limit: 6 vCPUs, 48GB memory. We reserved some resources for some reason
Number of executor instances: 48
Spark version: 3.4.0
Java version: 17
Comet version: commit https://github.com/apache/datafusion-comet/commit/9205f0d1913933f2cc8767c02a7728a4e318dd49

Here are relevant spark configurations:
spark.executor.cores 6
spark.executor.memory 30719m
# Reserve native memory for comet, python and other stuff
spark.executor.memoryOverheadFactor 0.6
# Each executor core gets 1.2 GB memory for comet, all 6 executors will use 7.2GB memory.
# I know this is too small for comet, but it should not prevent the query from finishing
spark.comet.memory.overhead.factor 0.04

spark.sql.extensions org.apache.comet.CometSparkSessionExtensions
spark.comet.enabled true
spark.comet.exec.enabled true
spark.comet.exec.all.enabled true
spark.comet.exec.shuffle.enabled true
spark.comet.exec.shuffle.mode jvm
spark.shuffle.manager org.apache.spark.sql.comet.execution.shuffle.CometShuffleManager

CometShuffleMemoryAllocator allocates at most spark.comet.shuffle.memory.factor * spark.comet.memoryOverhead bytes of memory for all comet external sorters. Usually, the number of concurrently running external sorters is the number of executor cores. In this case, 1.2 * 0.7 GB shuffle memory is shared by all 6 cores.
While for other native comet operators, a dedicated GreedyMemoryPool sized spark.comet.memoryOverhead is created for each operator (assuming we are not using the unified memory manager introduced by https://github.com/apache/datafusion-comet/pull/83), the comet shuffle memory amortized to each core is too small compared to other operators, unless we configure spark.comet.columnar.shuffle.memorySize additionally.
CometShuffleMemoryAllocator is a singleton, so all comet external sorters allocate from a shared memory pool. The comet external sorters can only spill themselves when allocation fails, and the CometShuffleMemoryAllocator does not support making other memory consumers spill to free up memory for the requesting memory consumer. If a comet external sorter is using just a tiny amount of memory and fails an allocation, it won't be able to do anything other than throw a SparkOutOfMemoryError exception. Is it feasible to support creating dedicated CometShuffleMemoryAllocator for each shuffle writer, since it is a safer choice when operators can only self-spill?

@Kontinuation @viirya I am trying to reproduce this issue now, but I am not sure if it is already resolved by https://github.com/apache/datafusion-comet/pull/988?

I think so.

I think it is not. This is related to the Java implementation of comet columnar shuffle (spark.comet.exec.shuffle.mode=jvm ), the native shuffle writer is not used in this case, so the fix for the native shuffle writer may not resolve this issue.

Oh, this is a separate issue.

I have not been able to reproduce this issue yet.

I do wonder if the issue is related to specifying spark.sql.extensions=org.apache.comet.CometSparkSessionExtensions (which was originally the documented way to enable Comet) rather than using spark.plugins=org.apache.spark.CometPlugin which would set the executor memory correctly.

I could not reproduce this issue in k8s either.

I now see that I missed spark.comet.exec.shuffle.mode=jvm. Retesting...

I can reproduce this now.


key pulling no longer works with 1.1.2 ( or not yet fixed )

Cookbook version
1.1.2
Chef-client version
13
Platform Details
debian stretch (9)
Scenario:
running test kitchen
Steps to Reproduce:
just include
include_recipe 'chef-apt-docker'

Expected Result:
not exceptions
Actual Result:
Mixlib::ShellOut::ShellCommandFailed
           ------------------------------------
           execute[install-key 58118E89F3A912897C070ADBF76221572C52609D] (/opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.2.20/lib/chef/provider/apt_repository.rb line 196) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '2'
           ---- Begin output of apt-key adv --recv --keyserver hkp://pgp.mit.edu:80 58118E89F3A912897C070ADBF76221572C52609D ----
           STDOUT: Executing: /tmp/apt-key-gpghome.bY6FoKrRNq/gpg.1.sh --recv --keyserver hkp://pgp.mit.edu:80 58118E89F3A912897C070ADBF76221572C52609D
           STDERR: Warning: apt-key output should not be parsed (stdout is not a terminal)
           gpg: failed to start the dirmngr '/usr/bin/dirmngr': No such file or directory
           gpg: connecting dirmngr at '/tmp/apt-key-gpghome.bY6FoKrRNq/S.dirmngr' failed: No such file or directory
           gpg: keyserver receive failed: No dirmngr
           ---- End output of apt-key adv --recv --keyserver hkp://pgp.mit.edu:80 58118E89F3A912897C070ADBF76221572C52609D ----
           Ran apt-key adv --recv --keyserver hkp://pgp.mit.edu:80 58118E89F3A912897C070ADBF76221572C52609D returned 2

probably related to debian stretch, seems you only test up to jessie: https://github.com/chef-cookbooks/chef-apt-docker/blob/master/.kitchen.yml#L13
might be related to this checkin https://github.com/chef-cookbooks/chef-apt-docker/commit/bd4415a7b596f4de23a93219b03c0bbcfee31e53

confirmed, its related to debian stretch, debain jessie works. Maybe this boils down to the new gpg.d key way of distributing keys under stretch?

The issue is that we need to install dirmngr

@EugenMayer Exactly what version of Chef 13 are you using? We did make some changes to how this is handled recently in chef-client.

It's test kitchen, so most probably the newest 13.x .. beside that installing dirmngr does fix this and iam prettying sure that is not handled by chef internally

@EugenMayer I added dirmngr locally, but things still fail. It looks like there isn't a debian 9 docker package yet so the repos fail.

That's wrong, since you need transport-https under Debian 8 too, you need to split those conditions

The real fix here is to apply the apt cookbook and get the https support, which for some reason in 2017 debian still doesn't think belongs in the base OS. This will workaround the issue on Debian 9 though.


Use of try_join_all hurts Tokio performance significantly

Due to the coop system, this is very slow on Tokio due to this issue. The issue was fixed for join_all, but not try_join_all.

Ah yes - thanks for bringing this up! I have been aware of the general issues with *_join_all and coop for a while. However, I have not looked at this particular project in some time - possibly before coop was introduced. Am I right in thinking that spawn should avoid those problems? In fact, spawn would even be closer to the original scenario than try_join_all. I believe I switched to try_join_all to avoid abstracting over (and measuring the overhead of) the different spawn interfaces and implementations.
So I tried updating and fixing this and other issues, but I concluded it would be better to simply update the README and archive the project. I originally wrote this as a reproduction case for a ~40x performance difference that no longer exists, and I haven't maintained it. I sincerely doubt that it produces (or ever produced?) useful or reliable metrics for real applications.

Yeah, spawn should avoid these issues. If you note the issue in the README, that seems fine to me.
It turns out that there aren't many benchmarks comparing Tokio and async-std, so this is one of the benchmarks people use as it's the only they can find.


Aligns certificate secrets design

Towards https://github.com/giantswarm/giantswarm/issues/1482
This PR is a bit of a roundhouse kick. Aligning some internals with our PKI design before moving to use the certificatetpr watcher.

@xh3b4sd @kopiczko I don't think I was clear here. My idea with this PR is to align the way we consume certificates with our general certificate pattern (clusterID and clusterComponent labels, and all that, as opposed to relying on the name of the certificate secret). This makes the prometheus-config-controller integrate much nicer overall.
I want to use the certificatetpr Service to fetch these, but I'm not happy with the testing there yet (my whole rant yesterday), so I'd rather do this when adding integration testing.
The current desired state implementation is lacking, because I'm planning on throwing it away asap.
Is this good for you guys, or do you want me to expand on the desired state implementation? i don't see much worth there at all.


Identityserver encoding state fix

Using IdentityServer with the code flow 'mangles' the return URL somewhere with URI encoding.
See screencap:

/extras/admin2gets turned into %2Fextras%2Fadmin2

Thx for the PR! Might take a short bit before I get time to test it and include it (I'm super confused that I didn't catch this when I tested it before... :/) but will try to make time soon!

Worked like a charm, thx! <3


Fix bug for markers in LinearFormExtension::Assemble

The checks on lines 28 and 66 of LinearFormExtension::Assemble:
const int mesh_attributes_size = fes.GetMesh()->attributes.Size();

and:
const int bdr_attributes_size = fes.GetMesh()->bdr_attributes.Size();

should use Max() I think. This is done correctly in LinearForm::Assemble. This bug shows up when mesh attributes are not contiguous and because the use_device parameter to Assemble is true. This would also show up once the default assembly level is set to FULL as per https://github.com/mfem/mfem/pull/3235.
I'm not sure if there are corresponding changes required for BilinearFormExtension classes. I'm not very familiar but these appear to potentially disregard the markers entirely? This should be considered before changing defaults to AssemblyLevel::FULL I think. As an additional aside, from my experience using FULL for vector FE spaces is unsupported because the element assembly integrators are not yet implemented.

PR
Author
Editor
Reviewers
Assignment
Approval
Merge

#3240
@sebastiangrimberg
@pazner
@pazner + @camierjs
9/30/22
⌛due 10/14/22
⌛due 10/21/22

PR Checklist

[ ] Code builds.
[ ] Code passes make style.
[ ] Update CHANGELOG:

[ ] Is this a new feature users need to be aware of? New or updated example or miniapp?
[ ] Does it make sense to create a new section in the CHANGELOG to group with other related features?

[ ] Update INSTALL:

[ ] Had a new optional library been added? If so, what range of versions of this library are required? (Make sure the external library is compatible with our BSD license, e.g. it is not licensed under GPL!)
[ ] Have the version ranges for any required or optional libraries changed?
[ ] Does make or cmake have a new target?
[ ] Did the requirements or the installation process change? (rare)

[ ] Update continuous integration server configurations if necessary (e.g. with new version requirements for each of MFEM's dependencies)

[ ] .github
[ ] .appveyor.yml

[ ] Update .gitignore:

[ ] Check if make distclean; git status shows any files that were generated from the source by the project (not an IDE) but we don't want to track in the repository.
[ ] Add new patterns (just for the new files above) and re-run the above test.

[ ] New examples:

[ ] All sample runs at the top of the example source file work.
[ ] Update examples/makefile:

[ ] Add the example code to the appropriate SEQ_EXAMPLES and PAR_EXAMPLES variables.
[ ] Add any files generated by it to the clean target.
[ ] Add the example binary and any files generated by it to the top-level .gitignore file.

[ ] Update examples/CMakeLists.txt:

[ ] Add the example code to the ALL_EXE_SRCS variable.
[ ] Make sure THIS_TEST_OPTIONS is set correctly for the new example.

[ ] List the new example in doc/CodeDocumentation.dox.
[ ] If new examples directory (e.g.examples/pumi), list it in doc/CodeDocumentation.conf.in
[ ] Companion pull request for documentation in mfem/web repo:

[ ] Update or add example-specific documentation, see e.g. the src/examples.md.
[ ] Add the description, labels and screenshots in src/examples.md and src/img.
[ ] In examples.md, list the example under the appropriate categories, add new categories if necessary.
[ ] Add a short description of the example in the "Extensive Examples" section of features.md.

[ ] New miniapps:

[ ] All sample runs at the top of the miniapp source file work.
[ ] Update top-level makefile and makefile in corresponding miniapp directory.
[ ] Add the miniapp binary and any files generated by it to the top-level .gitignore file.
[ ] Update CMake build system:

[ ] Update the CMakeLists.txt file in the miniapps directory, if the new miniapp is in a new directory.
[ ] Add/update the CMakeLists.txt file in the new miniapp directory.
[ ] Consider adding a new test for the new miniapp.

[ ] List the new miniapp in doc/CodeDocumentation.dox
[ ] If new miniapps directory (e.g.miniapps/nurbs), add it to MINIAPP_SUBDIRS in the makefile.
[ ] If new miniapps directory (e.g.miniapps/nurbs), list it in doc/CodeDocumentation.conf.in
[ ] Companion pull request for documentation in mfem/web repo:

[ ] Update or add miniapp-specific documentation, see e.g. the src/meshing.md and src/electromagnetics.md files.
[ ] Add the description, labels and screenshots in src/examples.md and src/img.
[ ] The miniapps go at the end of the page, and are usually listed only under a specific "Application (PDE)" category.
[ ] Add a short description of the miniapp in the "Extensive Examples" section of features.md.

[ ] New capability:

[ ] All new public, protected, and private classes, methods, data members, and functions have full Doxygen-style documentation in source comments. Documentation should include descriptions of member data, function arguments and return values, template parameters, and prerequisites for calling new functions.
[ ] Pointer arguments and return values must specify whether ownership is being transferred or lent with the call.
[ ] Any new functions should include descriptions of their intended use e.g. for internal use only, user-facing, etc., along with references to example code whenever possible/appropriate.
[ ] Consider adding new sample runs in existing examples to highlight the new capability.
[ ] Consider saving cool simulation pictures with the new capability in the Confluence gallery (LLNL only) or submitting them, via pull request, to the gallery section of the mfem/web repo.
[ ] If this is a major new feature, consider mentioning it in the short summary inside README (rare).
[ ] List major new classes in doc/CodeDocumentation.dox (rare).

[ ] Update this checklist, if the new pull request affects it.
[ ] Run make unittest to make sure all unit tests pass.
[ ] Run the tests in tests/scripts.
[ ] (LLNL only) After merging:

[ ] Update internal tests to include the new features.

This PR is now under review (see the table in the PR description). To help with the review process, please do not force push to the branch.

Merged in next for testing...


Font size changed by editing

I set this on CSS:
table.jexcel{   font-size:18px;   font-family: 'Arial'; }
When I edit cell, font is changed to some small and different family. How to keep font same size and family, please?
Thank you.

You can add that for example.
table.jexcel select, table.jexcel input{ font-size:18px; font-family: 'Arial'; }


Use tool with ollama

Hi,
Is it possible to use tools with ollama ?
I have found this article
https://ollama.com/blog/tool-support
I have tried with OllamaChat() but it's not implemented.
I also tried with OpenAiChat() but I can specify the url of ollama server (to test with openAi compatibility)
Thank you

Yes we should update the class so we can use tools with Ollama

I have with this problem to use Ollama
"message": "cURL error 7: Failed to connect to localhost port 11434 after 0 ms: Couldn't connect to server (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for http://localhost:11434/api/embeddings",
"exception": "GuzzleHttp\Exception\ConnectException",
"file": "/var/www/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php",
"line": 275,
"trace": [
{
"file": "/var/www/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php",
"line": 205,
"function": "createRejection",
"class": "GuzzleHttp\Handler\CurlFactory",
"type": "::"
},
{
"file": "/var/www/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php",
"line": 157,
"function": "finishError",
"class": "GuzzleHttp\Handler\CurlFactory",
"type": "::"
},
{
"file": "/var/www/vendor/guzzlehttp/guzzle/src/Handler/CurlHandler.php",
"line": 47,
"function": "finish",
"class": "GuzzleHttp\Handler\CurlFactory",
"type": "::"
},
{
"file": "/var/www/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php",
"line": 28,
"function": "__invoke",
"class": "GuzzleHttp\Handler\CurlHandler",
"type": "->"
},
{
"file": "/var/www/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php",
"line": 48,
"function": "GuzzleHttp\Handler\{closure}",
"class": "GuzzleHttp\Handler\Proxy",
"type": "::"
},
{
"file": "/var/www/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php",
"line": 64,
"function": "GuzzleHttp\Handler\{closure}",
"class": "GuzzleHttp\Handler\Proxy",
"type": "::"
},
{
"file": "/var/www/vendor/guzzlehttp/guzzle/src/Middleware.php",
"line": 31,
"function": "__invoke",
"class": "GuzzleHttp\PrepareBodyMiddleware",
"type": "->"
},
{
"file": "/var/www/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php",
"line": 71,
"function": "GuzzleHttp\{closure}",
"class": "GuzzleHttp\Middleware",
"type": "::"
},
{
"file": "/var/www/vendor/guzzlehttp/guzzle/src/Middleware.php",
"line": 66,
"function": "__invoke",
"class": "GuzzleHttp\RedirectMiddleware",
"type": "->"
},
{
"file": "/var/www/vendor/guzzlehttp/guzzle/src/HandlerStack.php",
"line": 75,
"function": "GuzzleHttp\{closure}",
"class": "GuzzleHttp\Middleware",
"type": "::"
},
{
"file": "/var/www/vendor/guzzlehttp/guzzle/src/Client.php",
"line": 333,
"function": "__invoke",
"class": "GuzzleHttp\HandlerStack",
"type": "->"
},
{
"file": "/var/www/vendor/guzzlehttp/guzzle/src/Client.php",
"line": 169,
"function": "transfer",
"class": "GuzzleHttp\Client",
"type": "->"
},
{
"file": "/var/www/vendor/guzzlehttp/guzzle/src/Client.php",
"line": 189,
"function": "requestAsync",
"class": "GuzzleHttp\Client",
"type": "->"
},
{
"file": "/var/www/vendor/guzzlehttp/guzzle/src/ClientTrait.php",
"line": 95,
"function": "request",
"class": "GuzzleHttp\Client",
"type": "->"
},
{
"file": "/var/www/vendor/theodo-group/llphant/src/Embeddings/EmbeddingGenerator/Ollama/OllamaEmbeddingGenerator.php",
"line": 38,
"function": "post",
"class": "GuzzleHttp\Client",
"type": "->"
},
{
"file": "/var/www/vendor/theodo-group/llphant/src/Query/SemanticSearch/QuestionAnswering.php",
"line": 78,
"function": "embedText",
"class": "LLPhant\Embeddings\EmbeddingGenerator\Ollama\OllamaEmbeddingGenerator",
"type": "->"
},
{
"file": "/var/www/vendor/theodo-group/llphant/src/Query/SemanticSearch/QuestionAnswering.php",
"line": 28,
"function": "searchDocumentAndCreateSystemMessage",
"class": "LLPhant\Query\SemanticSearch\QuestionAnswering",
"type": "->"
},
{
"file": "/var/www/app/Http/Controllers/RagController.php",
"line": 38,
"function": "answerQuestion",
"class": "LLPhant\Query\SemanticSearch\QuestionAnswering",
"type": "->"
},
{
"file": "/var/www/app/Http/Controllers/ChatBotController.php",
"line": 12,
"function": "initRag",
"class": "App\Http\Controllers\RagController",
"type": "->"
},
{
"file": "/var/www/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php",
"line": 46,
"function": "pergunta",
"class": "App\Http\Controllers\ChatBotController",
"type": "->"
},
{
"file": "/var/www/vendor/laravel/framework/src/Illuminate/Routing/Route.php",
"line": 260,
"function": "dispatch",
"class": "Illuminate\Routing\ControllerDispatcher",
"type": "->"
},
{
"file": "/var/www/vendor/laravel/framework/src/Illuminate/Routing/Route.php",
"line": 206,
"function": "runController",
"class": "Illuminate\Routing\Route",
"type": "->"
},
{
"file": "/var/www/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
"line": 808,
"function": "run",
"class": "Illuminate\Routing\Route",
"type": "->"
},
{
"file": "/var/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 144,
"function": "Illuminate\Routing\{closure}",
"class": "Illuminate\Routing\Router",
"type": "->"
},
{
"file": "/var/www/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php",
"line": 50,
"function": "Illuminate\Pipeline\{closure}",
"class": "Illuminate\Pipeline\Pipeline",
"type": "->"
},
{
"file": "/var/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 183,
"function": "handle",
"class": "Illuminate\Routing\Middleware\SubstituteBindings",
"type": "->"
},
{
"file": "/var/www/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php",
"line": 88,
"function": "Illuminate\Pipeline\{closure}",
"class": "Illuminate\Pipeline\Pipeline",
"type": "->"
},
{
"file": "/var/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 183,
"function": "handle",
"class": "Illuminate\Foundation\Http\Middleware\VerifyCsrfToken",
"type": "->"
},
{
"file": "/var/www/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php",
"line": 49,
"function": "Illuminate\Pipeline\{closure}",
"class": "Illuminate\Pipeline\Pipeline",
"type": "->"
},
{
"file": "/var/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 183,
"function": "handle",
"class": "Illuminate\View\Middleware\ShareErrorsFromSession",
"type": "->"
},
{
"file": "/var/www/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php",
"line": 121,
"function": "Illuminate\Pipeline\{closure}",
"class": "Illuminate\Pipeline\Pipeline",
"type": "->"
},
{
"file": "/var/www/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php",
"line": 64,
"function": "handleStatefulRequest",
"class": "Illuminate\Session\Middleware\StartSession",
"type": "->"
},
{
"file": "/var/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 183,
"function": "handle",
"class": "Illuminate\Session\Middleware\StartSession",
"type": "->"
},
{
"file": "/var/www/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php",
"line": 37,
"function": "Illuminate\Pipeline\{closure}",
"class": "Illuminate\Pipeline\Pipeline",
"type": "->"
},
{
"file": "/var/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 183,
"function": "handle",
"class": "Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse",
"type": "->"
},
{
"file": "/var/www/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php",
"line": 75,
"function": "Illuminate\Pipeline\{closure}",
"class": "Illuminate\Pipeline\Pipeline",
"type": "->"
},
{
"file": "/var/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 183,
"function": "handle",
"class": "Illuminate\Cookie\Middleware\EncryptCookies",
"type": "->"
},
{
"file": "/var/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 119,
"function": "Illuminate\Pipeline\{closure}",
"class": "Illuminate\Pipeline\Pipeline",
"type": "->"
},
{
"file": "/var/www/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
"line": 807,
"function": "then",
"class": "Illuminate\Pipeline\Pipeline",
"type": "->"
},
{
"file": "/var/www/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
"line": 786,
"function": "runRouteWithinStack",
"class": "Illuminate\Routing\Router",
"type": "->"
},
{
"file": "/var/www/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
"line": 750,
"function": "runRoute",
"class": "Illuminate\Routing\Router",
"type": "->"
},
{
"file": "/var/www/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
"line": 739,
"function": "dispatchToRoute",
"class": "Illuminate\Routing\Router",
"type": "->"
},
{
"file": "/var/www/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php",
"line": 201,
"function": "dispatch",
"class": "Illuminate\Routing\Router",
"type": "->"
},
{
"file": "/var/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 144,
"function": "Illuminate\Foundation\Http\{closure}",
"class": "Illuminate\Foundation\Http\Kernel",
"type": "->"
},
{
"file": "/var/www/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php",
"line": 21,
"function": "Illuminate\Pipeline\{closure}",
"class": "Illuminate\Pipeline\Pipeline",
"type": "->"
},
{
"file": "/var/www/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php",
"line": 31,
"function": "handle",
"class": "Illuminate\Foundation\Http\Middleware\TransformsRequest",
"type": "->"
},
{
"file": "/var/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 183,
"function": "handle",
"class": "Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull",
"type": "->"
},
{
"file": "/var/www/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php",
"line": 21,
"function": "Illuminate\Pipeline\{closure}",
"class": "Illuminate\Pipeline\Pipeline",
"type": "->"
},
{
"file": "/var/www/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php",
"line": 51,
"function": "handle",
"class": "Illuminate\Foundation\Http\Middleware\TransformsRequest",
"type": "->"
},
{
"file": "/var/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 183,
"function": "handle",
"class": "Illuminate\Foundation\Http\Middleware\TrimStrings",
"type": "->"
},
{
"file": "/var/www/vendor/laravel/framework/src/Illuminate/Http/Middleware/ValidatePostSize.php",
"line": 27,
"function": "Illuminate\Pipeline\{closure}",
"class": "Illuminate\Pipeline\Pipeline",
"type": "->"
},
{
"file": "/var/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 183,
"function": "handle",
"class": "Illuminate\Http\Middleware\ValidatePostSize",
"type": "->"
},
{
"file": "/var/www/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php",
"line": 110,
"function": "Illuminate\Pipeline\{closure}",
"class": "Illuminate\Pipeline\Pipeline",
"type": "->"
},
{
"file": "/var/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 183,
"function": "handle",
"class": "Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance",
"type": "->"
},
{
"file": "/var/www/vendor/laravel/framework/src/Illuminate/Http/Middleware/HandleCors.php",
"line": 49,
"function": "Illuminate\Pipeline\{closure}",
"class": "Illuminate\Pipeline\Pipeline",
"type": "->"
},
{
"file": "/var/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 183,
"function": "handle",
"class": "Illuminate\Http\Middleware\HandleCors",
"type": "->"
},
{
"file": "/var/www/vendor/laravel/framework/src/Illuminate/Http/Middleware/TrustProxies.php",
"line": 57,
"function": "Illuminate\Pipeline\{closure}",
"class": "Illuminate\Pipeline\Pipeline",
"type": "->"
},
{
"file": "/var/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 183,
"function": "handle",
"class": "Illuminate\Http\Middleware\TrustProxies",
"type": "->"
},
{
"file": "/var/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 119,
"function": "Illuminate\Pipeline\{closure}",
"class": "Illuminate\Pipeline\Pipeline",
"type": "->"
},
{
"file": "/var/www/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php",
"line": 176,
"function": "then",
"class": "Illuminate\Pipeline\Pipeline",
"type": "->"
},
{
"file": "/var/www/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php",
"line": 145,
"function": "sendRequestThroughRouter",
"class": "Illuminate\Foundation\Http\Kernel",
"type": "->"
},
{
"file": "/var/www/vendor/laravel/framework/src/Illuminate/Foundation/Application.php",
"line": 1188,
"function": "handle",
"class": "Illuminate\Foundation\Http\Kernel",
"type": "->"
},
{
"file": "/var/www/public/index.php",
"line": 17,
"function": "handleRequest",
"class": "Illuminate\Foundation\Application",
"type": "->"
}
]
}

Hi @Gudetomi ,
first of all you need to install Ollama locally
https://ollama.com/
(you can also run Ollama via docker, but I think that it's easier and faster to run a local installation of it).
After installation, you can verify that Ollama is correctly installed by running:
ollama

You should see the various options of the command.
Then you need to download a model, for example:
ollama pull llama2

Once the model is downloaded, you can run it with the following command:
ollama run llama2

Then you can run your PHP application with LLPhant:
$config = new OllamaConfig();
$config->model = 'llama2';
$chat = new OllamaChat($config);

Hi @f-lombardo , I ran Ollama via docker, trying to use llama3.1 but this error occurs.

@f-lombardo Would there be any possibility of using GroqClud?

@f-lombardo Would there be any possibility of using GroqClud?

From a technical point of view, I don't see problems.
Try to create an issue for that, so we verify see how many people are interested in it and we can understand if anyone wants to create an implementation.

Hi @f-lombardo , I ran Ollama via docker, trying to use llama3.1 but this error occurs.

You could try these steps:
docker run -d -v ollama:/root/.ollama -p 11434:11434 --name ollama ollama/ollama

docker exec -it ollama ollama run llama3.1

Hi @Gudetomi ,
Depending on wheter you are running your PHP application and your Ollama server, there could be various settings for the url properties of the OllamaConfig:

Ollama
PHP
url

local
local
http://localhost:11434/api/

local
docker
http://host.docker.internal:11434/api/

docker
local
http://localhost:11434/api/

docker
docker
http://ollama:11434/api/

In the above schema I supposed that:

If Ollama runs in a docker container, it exposes the 11434 port

docker run -d -v ollama:/root/.ollama -p 11434:11434 --name ollama ollama/ollama

If both ollama and PHP are running inside docker containers, they are started with docker compose and the Ollama service is called ollama

Depending on wheter you are running your PHP application and your Ollama server, there could be various settings for the url properties of the OllamaConfig:

Hi @Gudetomi , did this suggestion fix your problem?

@f-lombardo
I was limited in GPU memory to use Ollama, as it is for academic work I will use Mistral as it uses the model online. Thank you for your attention!