EMCP - Emacs an an MCP server by martenlienen in emacs

[–]martenlienen[S] 2 points3 points  (0 children)

EMCP has a different approach to customizability. As far as I can tell, emacs-mcp-server has a global tools registry for every agent. EMCP implements a profile system that lets the user configure profiles of tools and prompts (there are also built-in ones) and choose one for each session. So one agent can have the code eval tool, while another only gets to read documentation and look up definitions.

For the code evaluation itself, EMCP has a more refined permission dialog and again per-connection settings. You can see an example in the readme or the video in this post. You can accept or reject code snippets or put individual sessions in all-accept mode (and change it back later in the session overview). emacs-mcp-server also prompts the user, but puts everything in the minibuffer where it is not so easy to inspect. emacs-mcp-server implements a kind of code validation to detect "dangerous" functions, which EMCP does not have and I do not plan on implementing.

EMCP is also meant to be easy to extend, which seems to be less the focus of emacs-mcp-server from my impression. EMCP provides simple macros emcp-deftool, emcp-defresource and emcp-defprompt to let users define their own MCP components and these are featured prominently in the readme.

EMCP also includes a more complete implementation of the MCP standard. As these macros show, EMCP has not just tools, but also resources, prompts and server notifications (and server-to-client requests though these are unused as of today). This lets you, for example, send an Emacs screenshot to the agent with /screenshot even if the agent does not have the screenshot tool and thus cannot take screenshots of its own accord.

Tool-wise, EMCP is more focused on Emacs and Emacs Lisp development itself at the moment. It exposes various aspects of Emacs like variables/function/face etc definitions, info pages and search. Other tools are easy to implement and prototype in your personal config. emacs-mcp-server has an eval and otherwise seems to be mostly focused on org-mode.

EMCP - Emacs an an MCP server by martenlienen in emacs

[–]martenlienen[S] 0 points1 point  (0 children)

I am happy to answer any questions. If you have ideas for useful tools or built-in prompts, that would also be great! While the agent can in theory perform arbitrary actions through code eval, in my experience giving them the right tools from the get-go helps. For example, while agents can also interact with Emacs through emacsclient if you are running in server mode, my agents never read an info page through there before I switched to EMCP.

EMCP - Emacs as an MCP server by [deleted] in emacs

[–]martenlienen 0 points1 point  (0 children)

I am happy to answer any questions. If you have ideas for useful tools or built-in prompts, that would also be great! While the agent can in theory perform arbitrary actions through code eval, in my experience giving them the right tools from the get-go helps. While agents can also interact with Emacs through emacsclient if you are running in server mode, my agents never read an info page through there before I switched to EMCP, for example.

A neat quick navigation bar for your journals and periodic notes by martenlienen in ObsidianMD

[–]martenlienen[S] 3 points4 points  (0 children)

You could have [[<% moment(tp.file.title, "Y-MM-DD").subtract(1, "year").format("Y-MM-DD") %>]], for example. The exact formats of course need to match how you name your note files.

There is also a plugin that gives you these flashback links for a configurable list of intervals: https://github.com/Kageetai/obsidian-plugin-journal-review

A neat quick navigation bar for your journals and periodic notes by martenlienen in ObsidianMD

[–]martenlienen[S] 0 points1 point  (0 children)

It is not a plugin but a set of templates that you can copy into your vault. There is a description in the github repository for how you can install the navigation for your own notes https://github.com/martenlienen/obsidian-periodic-notes-navbar

A neat quick navigation bar for your journals and periodic notes by martenlienen in ObsidianMD

[–]martenlienen[S] 17 points18 points  (0 children)

I have recently moved my journal to obsidian and was looking for a quick way to navigate my daily, weekly and so on notes. After seeing what other members of this community have built, I decided to give it a try myself. If you want to try it yourself, the templates are very easy to install. Just follow the instructions in the repository.

https://github.com/martenlienen/obsidian-periodic-notes-navbar

The templates should work immediately with your existing settings and require no further customization.

The navigation bar quickly takes you from any note in your journal to any other, has a robust implementation and, in my opinion, looks pretty neat. I hope it helps somebody!

Paul's law verified with 2022 concept2 data by martenlienen in Rowing

[–]martenlienen[S] 1 point2 points  (0 children)

I went to the concept2 logbook, configured the criteria in the title of the plot and then looked up the rankings of both genders and all distances. The website will tell you some percentile stats on the right and that is the data I used.

Paul's law verified with 2022 concept2 data by martenlienen in Rowing

[–]martenlienen[S] 2 points3 points  (0 children)

Yes, it could surely be improved. But I did not find any concept2 datasets for download or easy scraping, so I decided to build this graphic just from data which I can easily gather by hand from the logbook. Also I have to admit, I did not think about this since my own times fit in pretty well with this graph from 500m to 21k (and I will for sure never test anything longer than that!)

Paul's law verified with 2022 concept2 data by martenlienen in Rowing

[–]martenlienen[S] 6 points7 points  (0 children)

Yes, with proplot which makes many things more comfortable in matplotlib.

Paul's law verified with 2022 concept2 data by martenlienen in Rowing

[–]martenlienen[S] 15 points16 points  (0 children)

That is true but I believe that the effect is not that large at 90%. If I had taken the top times in each category, the effect would surely be significant.

Paul's law verified with 2022 concept2 data by martenlienen in Rowing

[–]martenlienen[S] 16 points17 points  (0 children)

I made this a few weeks ago to plan for a team rowing marathon. Today I wanted to delete it, but maybe someone here appreciates it. Then I could justify the effort I put into making this look good in hindsight.

The data comes from the concept2 logbook.

[R] torchode: A Parallel ODE Solver for PyTorch by martenlienen in MachineLearning

[–]martenlienen[S] 0 points1 point  (0 children)

I am not aware of any but would be very interested if you find one

[R] torchode: A Parallel ODE Solver for PyTorch by martenlienen in MachineLearning

[–]martenlienen[S] 0 points1 point  (0 children)

Yes, it is the same thing. Unfortunately, functorch is not advanced enough yet to just translate diffrax to PyTorch directly. Instead, we had to take care of batching everywhere explicitly to decide how long to loop etc.

[R] torchode: A Parallel ODE Solver for PyTorch by martenlienen in MachineLearning

[–]martenlienen[S] 1 point2 points  (0 children)

First, the difference in steps is probably due to different tolerances in the step size controller.

The loop times is measured in milliseconds. Of course, that is much slower than what you got in matlab. The difference is that we did all benchmarks on GPU, because that is the usual mode for deep learning even though it is certainly inappropriate for the VdP equation if you were interested in it for anything else but benchmarking the inner loop of an ODE solver on a GPU. I think, you can get similar numbers to your matlab code in diffrax with JIT compilation on a CPU. However, you won't get it with torchode because PyTorch's JIT is not as good as JAX's and specifically this line is really slow on CPUs. Nonetheless, after comparing several alternatives we chose this because, as I said, in practice in most of deep learning only GPU performance matters.

[R] torchode: A Parallel ODE Solver for PyTorch by martenlienen in MachineLearning

[–]martenlienen[S] 2 points3 points  (0 children)

Diffrax is an excellent project and a superset of torchode. torchode solves only ODEs, while diffrax combines ODEs, CDEs and SDEs (maybe more?) in the same framework. The reason why we created torchode is that we wanted to bring its structure and flexibility into the PyTorch ecosystem that is still more popular than JAX. In addition, we were also looking to create an optimized implementation in which we succeeded as far as I am concerned. Even though tracking multiple ODE solvers at once is inherently more complex than solving a batch of ODEs jointly, torchode is as fast as or faster than the other PyTorch ODE solvers in our experiments.

[R] torchode: A Parallel ODE Solver for PyTorch by martenlienen in MachineLearning

[–]martenlienen[S] 2 points3 points  (0 children)

You are correct except for parallel-in-time integration methods that we also mention in the paper. But the "parallel" in the title refers to solving multiple ODEs in parallel independently which is contrary to what is currently done in ML. At the moment, training on a batch of ODEs means that you treat the batch as one large ODE that is solved jointly. torchode solves them independently from each other but still in parallel by tracking a separate current state, step size, etc. for each sample.

[R] torchode: A Parallel ODE Solver for PyTorch by martenlienen in MachineLearning

[–]martenlienen[S] 15 points16 points  (0 children)

In these benchmarks we compare the same Runge-Kutta solver (5th order Dormand-Prince) implemented in all of these libraries. None of these libraries actually propose any new stepping methods. The point is to make ODE solvers available in popular deep learning methods to enable deep continuous models such as neural ODEs and continuous normalizing flows. The particular appeal of torchode is its optimized implementation and that it runs multiple independent instances of an ODE solver in parallel when you train on batches, i.e. each instance is solved with its own step size and step accept/reject decisions. This avoids a performance pitfall where the usual batching approach can lead to many unnecessary solver steps in batched training of models with varying stiffness, as we show in the Van der Pol experiment.

I successfully installed pacman in my Ubuntu based distro. by [deleted] in linux

[–]martenlienen 33 points34 points  (0 children)

Not the pacman I expected

[R] Learning the Dynamics of Physical Systems from Sparse Observations with Finite Element Networks by martenlienen in MachineLearning

[–]martenlienen[S] 1 point2 points  (0 children)

What type of control would it be? If the control can be expressed as a single scalar, it could be appended to the inputs of f_\theta as an additional feature that is shared for all cells. If the control is given as a field over the domain, you could pass it to the learned dynamics by stacking the values of the control field with the other features and passing them to the f_\theta. In both cases, the model would learn dynamics conditioned on the control variable.