Quantcast
Channel: Planet Sage
Viewing all 414 articles
Browse latest View live

OpenDreamKit: Jupyter Day in Orsay:

$
0
0

!!! SUBSCRIPTIONS ARE CLOSED

The LoOPS network, DevLog and OpenDreamKit are organising a day for the various tools available in the Jupyter environment. Notebooks are more and more used among research communities thanks to their ease of use and their interactivity. They allow an easy access to class documentation and appealing practical exercises for students, to share ideas between colleagues and to initiate a reflexion to allow reproducible research works.

  • Where: Room 1-2-3 of the Institut d’Astrophysique Spatiale, Orsay, France
  • When: 6th of December 2016
  • Who: four core developers of Jupyter tools will be present (S. Corlay, A, Darian, T. Kluyver, B. Ragan-Kelley) and V. Pons who is working on SageMathCloud.
  • Event organisation: Loïc Gouarin

Subscriptions are free but mandatory. Most of talks and workshops will be given in English. You may need to bring your own training materials, in which case we will warn you in advance.

Agenda:

  • 9h15-9h45: Welcome
  • 9h45-12h45 Presentations
    • A. Darian et S. Corlay : JupyterLab and third-party extensions, featuring ipywidgets: the next generation of Jupyter notebooks.
    • B. Ragan-Kelley : JupyterHub: Deploying Jupyter Notebooks for students and researchers.
    • V Fauske : nbdime: diffing and merging notebooks.
    • V. Pons : the SageMathCloud platform
  • 12h45-14h00 Buffet
  • 14h00-14h30 T. Kluyver: Nbconvert: make things from notebooks
  • 14h30-17h30 Workshops run in parallel

Presentations:

1) A. Darian et S. Corlay : JupyterLab and third-party extensions, featuring ipywidgets: the next generation of Jupyter notebooks

This talk will consist of an architectural overview and the current state of affairs of the new JupyterLab and ipywidgets. It will feature demos of the master branch of these projects, reflecting the latest developments

2) B. Ragan-Kelley : JupyterHub: Deploying Jupyter Notebooks for students and researchers

Since the Jupyter notebook is a web-based environment, the notebook server can be run remotely, not just on your local machine. JupyterHub is a multi-user server, aimed at helping research groups and instructors host notebook servers for their users or students. By default, JupyterHub uses the local system users and PAM authentication, but it can be customized to use any authentication system, including GitHub, CILogon, Shibboleth, and more. The way single-user servers are spawned can also be customized to use services such as Docker, Kubernetes, or HPC cluster queuing systems. The tutorial will cover a basic deployment of JupyterHub on a single machine, then extending it to use docker and GitHub authentication, as well as general best practices for JupyterHub deployment.

3) V. Fauske : nbdime: diffing and merging notebooks

Jupyter notebooks are JSON documents containing a combination of code, prose, and output. These outputs may be rich media, such as HTML or images. The use of JSON and including output can present challenges when working with version control systems and code review. The JSON structure significantly impedes the readability of diffs, and simple line-based merge tools can produce invalid results. nbdime aims to provide diff and merge tools specifically for notebooks. For diffs, nbdime shows rendered diffs of notebooks, so that the content can be compared efficiently, rather than the raw JSON. Merges performed with nbdime will guarantee a valid notebook as a result, even in the event of conflicts. nbdime integrates with existing tools, such as git, so you shouldn’t need to change how you work.

4) V. Pons : the SageMathCloud platform

We will present the open-source interactive platform SageMathCloud and its many useful aspects for research collaboration and teaching:

  • creation of a collaborative project;
  • sharing files and worksheets;
  • using Jupyter in SageMathCloud;
  • multi-user real time editing;
  • course management with Jupyter and SageMathCloud

5) T. Kluyver : Nbconvert: make things from notebooks

Nbconvert is a set of tools to convert notebooks to other file types, such as HTML, Latex, or executable scripts. We’ll cover how to use it at the command line and in the notebook interface, along with an overview of how it works. Nbconvert is also designed to be highly extensible, and we’ll describe some of the things that can be done by building on nbconvert, such as extra converters, reports based on input, and cross-linking between converted notebooks.


OpenDreamKit: OpenDreamKit Virtual Research Environment

OpenDreamKit: Full-time mathematical software developer position at TU Kaiserslautern

$
0
0

We are seeking a full-time mathematical software developer at TU Kaiserslautern to work with Prof. Wolfram Decker on the Singular contribution to the OpenDreamKit project.

Deadline

Deadline for applications: TBA.

Location

The developer will work at TU Kaiserslautern in the city of Kaiserslautern Germany. Kaiserslautern is next to one of the largest contiguous forests in Europe.

Mission

To work as part of the OpenDreamKit collaboration, to implement improvements via parallelisation of components of Singular.

Activities

To implement parallel algorithms in Singular in C/C++.

Particular deliverables include:

  • Improving the quadratic sieve for integer factorisation.

  • Parallelising the new polynomial arithmetic functionality in Singular.

Depending on the skills of the applicant, the developer may also wish to contribute to other aspects of the Singular project and mathematical research in Kaiserslautern.

Skills requirements

  • C/C++ programming experience

  • Interest in either:

    • algebra/number theory/algebraic geometry
    • fast arithmetic
    • the design and development of computer algebra systems
  • Fluency in English

  • Must have an Masters degree in Mathematics fully certificated

  • Experience in Open Source development and tooling (GitHub)

Context

The position will be funded by

OpenDreamKit, a Horizon 2020 European Research Infrastructure project that will run for four years, starting from September

  1. This project brings together the open-source computational mathematics ecosystem – and in particular LinBox, MPIR, SageMath, GAP, PARI/GP, LMFDB, Singular, MathHub, and the IPython/Jupyter interactive computing environment. – toward building a flexible toolkit for Virtual Research Environments for mathematics. Lead by Université Paris-Sud, this project involves about 50 people spread over 15 sites in Europe, with a total budget of about 7.6 million euros.

Applications

Interested candidates should send an email to both decker {at} mathematik dot uni-kl dot de and goodwillhart {at} googlemail dot com with a CV and short letter of application, as soon as possible.

OpenDreamKit: nbdime 0.1.0

$
0
0

nbdime 0.1.0 has been released, implementing tools for diffing and merging Jupyter notebooks

Key features:

  • nbdiff for diffing notebooks in the terminal
  • nbdiff-web for viewing a rich, rendered diff of two notebooks
  • nbmerge for merging three notebooks, with automatic conflict resolution that should always guarantee a valid notebook, even with unresolved conflicts
  • nbmerge-web for manually resolving conflicts when merging notebooks
  • nbshow for quickly viewing a notebook in the terminal
  • git integration for using the diff and merge tools on notebook files by default

  • Read the docs!
  • Contribute!
  • Download!

OpenDreamKit: Full-time open-ended research software engineer position

$
0
0

We are seeking a full-time research software engineer at Warwick to work with Professor John Cremona on those parts of the OpenDreamKit project connected with the LMFDB in relation to Work Package 6. The position is open-ended. The post holder will be employed within the Scientific Computing Research Technology Platform (RTP) at Warwick, initially under secondment to Professor Cremona for the duration of the ODK project, together with longer-term responsibilities for the development and support of research software across the University.

Job advertisement

The full advertisement may be found here.

Deadline

Deadline for applications: 26 January 2017.

Location

The developer will work at the University of Warwick, UK.

Mission and activities

Initially, to work as part of the OpenDreamKit collaboration, on those parts of WP6 related to the LMFDB project. Longer term, to play a leading role in the development of research software support at Warwick.

Skills requirements

See the See the full job advertisement for a detailed job description, and a list f essential and desirable criteria for the person to be appointed.

Context

Until 31 August 2019, the position will be mainly funded by

OpenDreamKit, a Horizon 2020 European Research Infrastructure project that will run for four years, starting from September

  1. This project brings together the open-source computational mathematics ecosystem – and in particular LinBox, MPIR, SageMath, GAP, PARI/GP, LMFDB, Singular, MathHub, and the IPython/Jupyter interactive computing environment. – toward building a flexible toolkit for Virtual Research Environments for mathematics. Lead by Université Paris-Sud, this project involves about 50 people spread over 15 sites in Europe, with a total budget of about 7.6 million euros.

From 1 September 2019 the post will be funded by the University of Warwick.

Further particulars

See the full job advertisement.

Expressions of interest

Interested candidates should send an email to Professor John Cremona (j.e.cremona@warwick.ac.uk) for further information about the position, as soon as possible.

OpenDreamKit: From pythran import typing

OpenDreamKit: nbdime released

$
0
0

nbdime has had its first stable release. nbdime provides tools for diffing and merging Jupyter notebooks, and integrating notebooks into git workflow. nbdime aims to alleviate some common difficulties when working with Jupyter notebooks.

Particular features of nbdime:

  • recognizing binary outputs that cannot be reasonably interpreted in the terminal
  • recognizing transient fields and eliminating them from merge conflicts
  • ensuring that merged notebooks are always valid
  • integration with git as drivers for passive diff/merge integration and tools for interactive GUI integration

Tools provided by nbdime:

  • nbshow: show a legible formatting of a notebook on the command-line
  • nbdiff: command-line diff of notebooks, eliding outputs that are known to not be renderable in a terminal. nbdiff can be integrated into git as a diff driver
  • nbdiff-web: create a rich, rendered web view of the changes between two notebooks
  • nbmerge: three-way merge with automatic conflict resolution, which can be integrated into git as a merge driver, ensuring always-valid notebooks and eliminating merge conflicts on transient fields
  • nbmerge-web: interactive three-way merge tool for manually resolving merge conflicts

More info on nbdime.

OpenDreamKit: Workshop: Computational Mathematics with Jupyter


OpenDreamKit: Biannual ODK Steering Committee meeting

$
0
0

The biannual OpenDreamKit Steering Committee meeting is taking place in Edinburgh at the occasion of the Computational Mathematics with Jupyter workshop.

Brief agenda

  • Preparation for the formal review
  • Progress reports per site
  • Advisory Board and Quality Review Board
  • Amendment to the grant agreement
  • Key Performance Indicators
  • Deliverables due Month 18
  • WP7 topics in view of personnel changes
  • Future funding

Detailed agenda and minutes

Progress reports per site

OpenDreamKit: A case study of computational science in Jupyter notebooks: JOOMMF

$
0
0

Hans Fangohr gave an introduction to computational micromagnetics and the current workflow that is used by thousands of scientists across the planet. He then introduced a new Python interface to the computational tool (OOMMF), and demonstrate how this can be driven from within a Jupyter Notebook. Through the notebook, work can be carried out more effectively, and more reproducibly. A roadmap and update for the Jupyter-OOMMF project was presented as well.

Pdf slides of Talk

Notebook of micromagnetic simulation (standard problem 3)

Notebook of micromagnetic model

Blog entry mentioning the presentation

OpenDreamKit: Task based parallelization of recursive linear algebra routines using Kaapi

OpenDreamKit: Reports from "Computational Mathematics with Jupyter" workshop

$
0
0

Jointly with the Collaborative Computational Project “CoDiMa - CCP in the area of Computational Discrete Mathematics”, we have organised the workshop “Computational Mathematics with Jupyter”, which took place at the International Centre for Mathematical Sciences in Edinburgh on 16-20 January 2017. You can find some reports from the workshop here:

OpenDreamKit: SageMathCloud tutorial

OpenDreamKit: Jupyter Notebooks Facilitating Productivity, Sustainability, and Accessibility of Data Science

$
0
0

Min Ragan-Kelley presented a poster on Jupyter notebooks facilitating productivity, sustainability, and accessibility of data science and computational science in general. The poster included the role of OpenDreamKit-supported projects, such as nbdime and nbval in facilitating reproducible science.

PDF of Poster

DOI: 10.6084/m9.figshare.4696414.v1

OpenDreamKit: SageMathCloud for OpenDreamKit

$
0
0

Part of OpenDreamKit’s mission is to work on user interfaces for better collaboration and also component architectures. This is why the SageMathCloud platform is of special interest for us. One of our tasks is even to have a deeper look into its code base. In this post, as part of our Review on emerging technologies, we propose an overview of the platform.

What is SageMathCloud?

SageMathCloud is an online platform which allows the creation of collaborative scientific projects including many scientific softwares and tools like SageMath, Jupyter, SciPy, Julia, Latex, and more.

Its codebase is open-source, distributed under the GNU General Public License. The platform is run by a private company (SageMath Inc.) created by William Stein who is also the initiator of the SageMath software. The platform offers both free and paying premium accounts.

Projects

The main tool of the SageMathCloud platform is the possibility to create projects from which you can access the many features. A single user can create as many projects as needed. Each project is an independant Linux virtual machine. It thus comes with a full file system and an online terminal that allows you to run Linux commands. The storage of each project is limited by default but can be extended on premium accounts. You can access the files through the SageMathCloud web interface or also through ssh.

One key feature is that each project can be shared by multiple users. This allows sharing access to the files and also real time editing though the platform. Single files or folders can also be made public. A link is then provided which allows either viewing or downloading the files (even without a SageMathCloud account) and also an easy way to copy onto a different SageMathCloud project owned by the viewer.

Softwares

When you create a SageMathCloud project, your Linux virtual machine comes with many softwares and tools especially useful for mathematicians and scientists in general. We list here the most important ones.

  • Sage and Sage worksheets. As the name indicates, the platform was primarily developed as a replacement for the old Sage notebook server to allow collaborative online work using Sage. The SageMath software is of course installed by default on the virtual machine and one can run Sage through the online terminal. The platform also offers its own Sage worksheet filetype to edit and run Sage code in a cell-type system (as in the Jupyter notebook or the old Sage notebook) mixed with other cell types like text and HTML. This is used to create interactive worksheets that can be easily shared and copied.

  • Jupyter. SageMathCloud includes a Jupyter notebook interface with many kernel options (Python 2, Python 3, Anaconda, Sage, R, Julia, and more). On top of the usual interface, SageMathCloud’s Jupyter offers real time synchronization among multi users.

  • Latex. The common document preparation system Latex is installed on the virtual machine. It also offers a multi user editor with real time synchronization and a dual view of both the Latex source code and pdf output.

Notebooks: SMC, Sage and Jupyter

SageMathCloud offers very inovative features in terms of notebooks which should be studied both on technichal and usability aspects.

  • Real time notebooks. Real time multi user synchronization is a key aspect of SageMathCloud development. In particulatr, it has been a motivation for the development of SageMathCloud homemade Sage worksheet. More recently, it has also been added to the Jupyer notebook by enhancing the original software. This enhancement is of particular interest for OpenDreamKit as this could benefit all Jupyer users.

  • Muli-kernel, multi-client. The multi-kernel philosophy is an inherent part of Jupyer development. Indeed, Jupyer is a notebook interface that can be used with many different language kernels (python, Sage, Julia, and more). SageMathCloud follows the same spirit and offers a variety of kernels on the Sage worksheet. One advantage of the Sage worksheet is that it allows for many kernels to be used in different cells of one single worksheet (in Jupyer, the kernel has to be chosen once and for all for the entire worksheet). Furthermore, SageMathCloud has developed what they call the Jupyer bridge: allowing user to run a Jupyer kernel from within a Sage worksheet. In this sense, the Sage worksheet could be seen as alternative client to Jupyer the same way one can develop alternative kernels. More on this question can be read on the github page of SageMathInc.

Sharing and teaching with SageMathCloud

Accessibility

The great advantage of SageMathCloud is that it offers a complete scientific environment without the usual setting up hassle. It makes the different software very easy to access independently of the user personal system as long as there is an access to a good Internet connexion. As an example, a mathematician can share a demo of code (in a Jupyter or a Sage notebook) that could be used directly by its collaborators. Of course, the Internet access is itself a limit. Given poor network access, for example but not only in some developing countries where bandwidth is sometimes limited.

Teaching

When teaching is concerned, the sharing facilities of SageMathCloud come very useful. Moreover, the platform offers a course managing system. The principle is as follows: the teacher has acces to a “main project” containing the class material; every student has its own project which is shared with the teacher. The course management system allows for automatic actions like:

  • Create all the student projects where the teacher is automatically added as a collaborator.
  • Create assignments by copying some material from the main project to the students projects.
  • Collecting, grading, and returning assignments by copying back and forth between the students projects and the main project.

An assignment is just a folder. It can have multiple content depending on the class. Of course, the system is especially interesting when the assignment is given within an interactive worksheet and can then be achieved by the student directly on the interface. SageMathCloud then becomes a very good interface to initiate students to the many scientific softwares it offers.

SageMathCloud and OpenDreamKit

The many features of SageMathCloud make it a very interesting project for OpenDreamKit to look at. Indeed, it offers one of the leading technologies for scientists in terms of cloud project management, teaching and sharing facilities. In particular it showcases a collection of features that have been selected and adopted by a wide community.It also has some limits which we would like to address through our project:

  • Accessibility. As previously mentioned, the cloud based interface can not be easily accessed in places where the Internet connexion is not good enough. One solution would be to have clear easy-to-follow instructions on how to install a SageMathCloud platform in a local institution or on a personal machine. This is to be taken care of in D3.2 and D3.4.

  • Interoperability and file formats. At the moment, the SageMathCloud platform offers two file formats for interactive worksheet: the Jupyter one and a home-made Sage worksheet one. It is not possible to run the Sage worksheets elsewhere than on the platform. Especially, there is no way to run a Sage worksheet on a local Sage installation. It is not yet clear what a long term unified worksheet solution would be and it is part of the OpenDreamKit project to work on this question. The technical choices made for the Sage worksheets are interesting to investigate in this regard, as well as, file conversions and so on.


OpenDreamKit: Report on the WP6-WIAS Workshop on Math-in-the-Middle Content

$
0
0

WP6 participants JacU (Florian Rabe), FAU (Dennis Müller, Michael Kohlhase) and UZH (Paul Olivier Dehaye) came together with members of the Weierstrass Institute for Applied Analysis and Stochastics (WIAS: Thomas Koprucki and Carsten Tabelow) for a one-week code (20. 3. – 24. 3.) sprint on the Math-in-the-Middle Content and Logic and the encoding of mathematical Models. The result of this was a significant extension of the MitM ontology (in particular for the meta-theories for Sage) and a WIAS preprint on formalizations of Models.

OpenDreamKit: Exporting mathematical knowledge from Sage

$
0
0


Berlin workshop

This week the KWARC team (Michael Kohlhase, Florian Rabe, Dennis Müller) and myself met in Berlin at the WIAS. The goal was to meet some of the modelers working there, who are very interested in the MMT system and the work in OpenDreamKit. Their entry point is Work Package 6 (interoperability), motivated by the benefits they would get intrinsically from formalizing the mathematical work they do into the OMDoc/MMT language (e.g. addressability of mathematical models), but also with an eye on all the other work packages from OpenDreamKit (e.g.interactive documents). Personally, I was focused on working out what I could of a semantic interchange between Sage and GAP of mathematical objects.

Formalization of mathematical concepts

To start, we decided to do a bit of prototyping around transitive groups. The first step in the Math-in-the-Middle methodology for interoperability between computer algebra systems is to formalize the mathematical concept itself. Recent progress on the MMT language has actually made this very practical (see also here):

MMT syntax for transitive groups


A mathematician should be able to point to this and get near universal agreement in the community on what that means.

Line 24 is of course critical to the definition, but one can see that the rest is well structured and readable. I have omitted here the first five lines, which consist of include statements, and make the whole thing a completely formal definition yet implemented at a very high level of abstraction. You could slim down those includes and build the same thing on flexiformal foundations, e.g. not bother with the logic “deep down”.

Overall, not many mathematicians might be able to write this, but almost any mathematician can navigate her way through it. It also helps that the jEdit editor and the MathHub webserver have drastically improved, especially in ease of use (work done as part of Work Package 4), but also installation and resilience (work done as part of Work Package 3).

Math-in-the-Middle methodology


MitM paradigm


Now that we have a target formalization, the idea is to separately make Sage and GAP interact with it. In the Math-in-the-Middle (MitM) formalism adopted for Work Package 6, we think of having in the “center” a system-independent flexiformalization of the mathematical domains (represented in this diagram in blue; replace in your head EC for elliptic curves with TG for transitive groups).

The next step is to work on the reddish clouds, which are the interface theories between this center and the other systems. These interface theories mainly flexiformalize the system-specific aspects of the domain.

On the GAP side, GAP generates for those interfaces OMDoc/MMT Content Dictionaries (CDs) that contain name, type, and documentation for all API functions (constructors, predicates, methods, …). This is automated, has good coverage and is very rich semantically (more on that towards the end of the post). The next step of the plan is then to align the generated system CDs with the MitM formalization by the MMT implements relation of aligment (e.g. an aligment could be: GAP-transitive_group MMT-implements MitM-transitive group). If equivalent Sage CDs were available, as well as Sage alignments, we would get a semantic crosswalk between GAP and Sage by composing the MitM alignments between all those different CDs. This would provide the necessary framework for interoperability.

At the moment Sage does export some of its knowledge into CDs, thanks to what was implemented by Nicolas Thiéry, leveraging his category framework. This is unfortunately not enough to cover transitive groups, which have rich structure as category objects (but the “Category of Transitive Groups” does not exist in Sage). Given the circumstances of this workshop, I thus decided to focus on the Sage side, and see what information I could extract about transitive groups.

Exporting knowledge from Sage

If you look at Sage’s TransitiveGroup, a lot of mathematical knowledge is acquired from elsewhere through the class hierarchy lying above TransitiveGroup, and the category framework that instruments that hierarchy. This lead me to first try to build a model of how the Sage class TransitiveGroup was actually implemented and what it was doing, but this was a mistake. Indeed, it was very difficult, as I got lost between meta-logics and what I was actually trying to do: modeling Sage? modeling how Sage models math? how python uses Sage to model math? I was trying to do too much, too early and was probably the wrong person to do that.

If you look back at the methodology, the MitM CDs don’t need to link up to the Math-in-the-Middle content dictionary right away. This is actually up to the alignments, that come later (and could be done by a different person). I was trying to do both at once, while my focus should really have been: “how do I export, but not align, as much of the math knowledge as possible embedded into Sage into a language that can easily be processed by the KWARC team?” (for the categories export built by Nicolas Thiéry, the export went through JSON).

OK then, the question now becomes: “where is math knowledge embedded in Sage that is relevant to the mathematical concept of transitive group?” The first response is of course still “Everywhere!”, but where are actually the low hanging fruits?

A math skeleton

I found that the best way to communicate around this issue with the KWARC team is by extracting from Sage code a “math skeleton”. For this, the Sage-specific module sageinspect was very useful. I thus introspected the sage object corresponding to the class TransitiveGroup, and related objects:

# sage/src/sage/structure/sage_object.pyx
cdef class SageObject:

# sage/local/lib/python2.7/site-packages/sage/categories/category.py
class Category(UniqueRepresentation, SageObject):

# sage/src/sage/structure/category_object.pyx
cdef class CategoryObject(SageObject):

# sage/local/lib/python2.7/site-packages/sage/structure/parent.pyx
cdef class Parent(category_object.CategoryObject):

# sage/src/sage/groups/group.pyx
cdef class Group(Parent):

# sage/src/sage/groups/group.pyx
cdef class FiniteGroup(Group):

# sage/local/lib/python2.7/site-packages/sage/groups/perm_gps/permgroup.py
class PermutationGroup_generic(group.FiniteGroup):

# sage/local/lib/python2.7/site-packages/sage/groups/perm_gps/permgroup_named.py
class PermutationGroup_unique(CachedRepresentation, PermutationGroup_generic):

# sage/local/lib/python2.7/site-packages/sage/groups/perm_gps/permgroup_named.py
class TransitiveGroup(PermutationGroup_unique):

What is mathematical here? Clearly, just about everything, but that is because I was selective in the printout given above: I worked up the class hierarchy from TransitiveGroup by hand, but excluded all the python objects that don’t inherit from SageObject. For instance, you don’t see in that list:

# sage/local/lib/python2.7/site-packages/sage/structure/unique_representation.py
class CachedRepresentation:

CachedRepresentation is only relevant, from a mathematical standpoint, in where it appears as a superclass. Its own internals are pure design decisions for CAS software, not mathematics.

The criterion to use for “related objects” is thus that only objects inheriting from SageObject need to be navigated. So we are navigatin in the class hierarchy diamond between TransitiveGroup and SageObject, collecting classes, which I manually imported from the sage library (obviously this could be automated):

from sage.structure.sage_object import SageObject
from sage.structure.category_object import Category     # not strictly in the class hierarchy, but included to facilitate discussion
from sage.structure.category_object import CategoryObject
from sage.structure.parent import Parent
from sage.groups.group import Group
from sage.groups.group import FiniteGroup
from sage.groups.perm_gps.permgroup import PermutationGroup_generic
from sage.groups.perm_gps.permgroup_named import PermutationGroup_unique
from sage.groups.perm_gps.permgroup_named import TransitiveGroup

This is how I selected the objects from which I wanted to extract more information, producing the list of class definitions above.

[Note by the way the weird changes in the path to sageinspect.sage_getsource in the listing above (why??? because of interactions between import statements?)]

More flesh on the skeleton

The next step is to add a bit of flesh to that skeleton export. Obviously this is going to be more intricate. I have included here what you get when you look at all the methods coming out of the source code for TransitiveGroup, PermutationGroup_unique, etc. In other words, a completely static navigation to the specific methods. This was the right thing to do for communicating with the KWARC team, but is wrong for our ultimate purpose. It was the right thing to do to communicate with KWARC (or in a blog post) as it distilled Sage to its most interesting bits, and we could fill the gaps relying on comment concepts (like “class hierarchy”). However, as a quicker way to get more consistent and richer Sage output, I could have navigated dynamically to the relevant classes, and extracted all the methods available from the live objects. This is of course because tons of methods get added when the object gets created, with a lot of mathematics packed into that. The same math could be reconstructed from the source code, but obviously that would be harder to do as we would be re-emulating a lot of what python does.

In any case, here is the full printout of what I get for just the method declarations for PermutationGroup_generic, the Parent that is most interesting:


# sage/local/lib/python2.7/site-packages/sage/groups/perm_gps/permgroup.py
class PermutationGroup_generic(group.FiniteGroup):
    def __init__(self, gens=None, gap_group=None, canonicalize=True, domain=None, category=None):
    def construction(self):
    def _has_natural_domain(self):
    def _gap_init_(self):
    def _magma_init_(self, magma):
    def __cmp__(self, right):
    def _element_class(self):
    def __call__(self, x, check=True):
    def _coerce_impl(self, x):
    def list(self):
    def __contains__(self, item):
    def has_element(self, item):
    def __iter__(self):
    def gens(self):
    def gens_small(self):
    def gen(self, i=None):
    def identity(self):
    def exponent(self):
    def largest_moved_point(self):
    def degree(self):
    def domain(self):
    def _domain_gap(self, domain=None):
    def smallest_moved_point(self):
    def representative_action(self,x,y):
    def orbits(self):
    def orbit(self, point, action="OnPoints"):
    def transversals(self, point):
    def stabilizer(self, point, action="OnPoints"):
    def base(self, seed=None):
    def strong_generating_system(self, base_of_group=None):
    def _repr_(self):
    def _latex_(self):
    def _order(self):
    def order(self):
    def random_element(self):
    def group_id(self):
    def id(self):
    def group_primitive_id(self):
    def center(self):
    def socle(self):
    def frattini_subgroup(self):
    def fitting_subgroup(self):
    def solvable_radical(self):
    def intersection(self, other):
    def conjugacy_class(self, g):
    def conjugacy_classes(self):
    def conjugate(self, g):
    def direct_product(self, other, maps=True):
    def semidirect_product(self, N, mapping, check=True):
    def holomorph(self):
    def subgroup(self, gens=None, gap_group=None, domain=None, category=None, canonicalize=True, check=True):
    def as_finitely_presented_group(self, reduced=False):
    def quotient(self, N):
    def commutator(self, other=None):
    def cohomology(self, n, p = 0):
    def cohomology_part(self, n, p = 0):
    def homology(self, n, p = 0):
    def homology_part(self, n, p = 0):
    def character_table(self):
    def irreducible_characters(self):
    def trivial_character(self):
    def character(self, values):
    def conjugacy_classes_representatives(self):
    def conjugacy_classes_subgroups(self):
    def subgroups(self):
    def _regular_subgroup_gap(self):
    def has_regular_subgroup(self, return_group = False):
    def blocks_all(self, representatives = True):
    def cosets(self, S, side='right'):
    def minimal_generating_set(self):
    def normalizer(self, g):
    def centralizer(self, g):
    def isomorphism_type_info_simple_group(self):
    def is_abelian(self):
    def is_commutative(self):
    def is_cyclic(self):
    def is_elementary_abelian(self):
    def isomorphism_to(self, right):
    def is_isomorphic(self, right):
    def is_monomial(self):
    def is_nilpotent(self):
    def is_normal(self, other):
    def is_perfect(self):
    def is_pgroup(self):
    def is_polycyclic(self):
    def is_simple(self):
    def is_solvable(self):
    def is_subgroup(self, other):
    def is_supersolvable(self):
    def non_fixed_points(self):
    def fixed_points(self):
    def is_transitive(self, domain=None):
    def is_primitive(self, domain=None):
    def is_semi_regular(self, domain=None):
    def is_regular(self, domain=None):
    def normalizes(self, other):
    def composition_series(self):
    def derived_series(self):
    def lower_central_series(self):
    def molien_series(self):
    def normal_subgroups(self):
    def poincare_series(self, p=2, n=10):
    def sylow_subgroup(self, p):
    def upper_central_series(self):

Here are things a semi-intelligent mathematician can deduce from this fleshed-out skeleton, and that we might be able to export automatically:

  • The arity of all those functions is useful. Unfortunately, this being python (2.x), the type cannot simply be read. Michael Kohlhase has some interesting ideas regarding mathematicians, types and the modeling necessary for MMT. I think he is right, partly, and there is much to look forward to in the services MMT can provide around type inference. Note that it will be core to this process that MMT allows for flexiformalisation as well!
  • I omitted docstrings in this export, but of course this is also useful for semantic information in natural language. Often the docstring contains structured information too, for instance some typing information (see above).
  • There is, as often, a method called __init__ that specifies a constructor. In other words, some combination of maps from some parameter space into the object modeled by PermutationGroup_generic. That relationship is messy though, most of the time. Note that the GAP team took the opportunity over last summer to have an intern refactor/regularize the way they did constructors into a more “semantic” way”: essentially instead of using the elementary __init__, they made a defconstructor and gave it documentation, type information,… as parameters. Of course defconstructor elaborates to a call to __init__ but the parameters can be used in the CD generation (and for static type-based optimizations later; ask Markus Pfeiffer @ St. Andrews if you are interested in the details).
  • _gap_xxxx and _magma_xxxx indicate that the relevant “stuff” exists in the corresponding CASes. This is thus indicating a good place to bootstrap the alignment process between gap and sage, and therefore extract KPIs and generally optimize our progress. This would be best done by instrumenting at the SageObject level, since this is where all those _other-computer-algebra-system_xxxx methods are first located, as abstract methods.
  • the presence of magic methods __xxxxxxx__ indicates the existence of a relation of some kind on the elements of PermutationGroup_generic, which is a Sage Parent. However, this information is best extracted from the categories export itself, presumably all(?) the time.
  • is_xxxx methods indicate the existence of a test and thus a property.
  • after some very basic pruning, all the other methods indicate the existence of clear mathematical objects, often relatively simple maps.

Many of the deductions made above will be done in the same way for all Parents (at least if we go for the easiest information to grab), so that’s where the instrumentation should go. Most of that instrumentation actually makes sense to have in a CAS, beceause it exposes mathematically relevant concepts. It would simply be used by the exporter generating the Content Dictionary.

Remark: Ultimately we want to extract information from live objects. It should not be lost, however, that what we are trying to do is partly a social process (the study of this process is itself the topic of Work Package 7). Humans have built the code from which we are trying to extract information, and now we want to communicate that with other humans so they can in turn code on top of that. Those other humans are familiar with different tools. For instance the KWARC team uses MMT related tools, like MathHub, but not Sage. Presumably other CAS developers or even “plain” mathematicians will just see Sage through an interface built on top of MMT. So I would advocate that we:

  1. Make sure to export all the information containing math from Sage into MMT, even that which is not readable beyond text by the system we export to;
  2. Devise methods to make this informal export as addressable as possible from within MMT, but not necessarily runnable.

Step 1. could be useful for instance if one is working in GAP and asking “How does Sage do that?”. We should be able to access Sage source code from within GAP, and it will be useful for automating some tasks.

Step 2. would be useful for students in the KWARC group, for instance, who would then be able to extract semantically richer information from a system like Sage with just verbal instructions from domain specific experts, because the data is now in MMT format. It splits the step in two: MMT extraction and semantic extraction, and requires different skills.

The process could be further accelerated, I bet, by exposing also deep sage introspection tools into MMT.

At this stage self-preservation instincts kick in and I don’t want to think deeper at this proposal from a logical standpoint.


I wish to thank Michael Kohlhase for suggestions that have improved the first draft of this post.

OpenDreamKit: Report on WomenInSage

$
0
0

Last January, Viviane Pons, Jessica Striker and Jennifer Balakrishnan organized the first WomenInSage event in Europe with OpenDreamKit. 20 women spent a week together coding and learning in a rented house in the Paris area.

Group picture

The Workshop

Opening event

To open the workshop, Viviane, Jessica, and Jennifer gave a series of introduction to Sage lectures at the Institut Henri Poincaré in Paris, covering combinatorics and number theory.

The Week

The workshop then moved to the rented house. There, we organized short talk sessions to get to know our respective research fields and expectations for the week. After that, we were able to split into small groups to work on many different projects: STL export, Krummer surfaces, Kuznyechik cipher, Motzkin words, Shioda invariants, and more. We also had presentations on How to contribute to Sage (with a crash course on git) and How to write a Sage package. Every evening, we had a Status report session to share our progress with the group. You can read our program and final status reports on the event wikipage.

Special PyLadies coding cafe

Viviane Pons is one of the organizer of the local Paris chapter for PyLadies. She organized a meeting between the WomenInSage mathematician and the PyLadies developers. We were welcomed by Algolia for an afternoon of coding-and-chatting with the PyLadies.

Group picture with PyLadies

Impact

The data presented here come from a post-event questionnaire sent to the participants.

The gender gap is very important in the mathematic development community. In the OpenDreamKit project, among the 54 participants we are only 3 women. This reflects the global situation in the field. Many mathematician women are still hesitant to join our community and lack confidence in their abilities as developers. Organizing a women targeted event is a way to motivate them and building up self-confidence in a safe and casual atmosphere.

The women who attended the conference had various level of programming experience ranging from 1 (no experience) to 5 (a lot of experience).

1: 1 people, 2: 7 people, 3: 3 people , 4: 5 people, 5: 1 people

This disparity also reflected in their knowledge of Sage.

1: 1 people, 2: 8 people, 3: 3 people , 4: 3 people, 5: 2 people

As for contributions, only 4 participants had contributed to Sage in the past which included the 3 organizers. Also, a majority of participants had never attended a Sage Days before. Actually, 6 of them had never even heard of Sage Days and 2 of them said they did not think it was “for them”.

To the question “How did the fact that the event was targeted to women impact your decision to come? (Would you have participated in a classical SageDays)”, Many participants answered that it was indeed a factor a their decision.

Yes, but it helped. I didn´t feel so sure about my skills and being surrounded by women made things easier.

It was a new experience that I don’t regret at all.

I might have participated, but would have been less confident.

I have participated in and benefited from classical SageDays, but found this event to be even better at creating an atmosphere where everyone felt empowered to learn and contribute.

I made a special effort I would not have done for regular sage days.

One of the participant said she would not have felt comfortable sharing a house with men but that this event was such positive experience that she would now consider it for other Sage days. The event helped building up the confidence of the participants, 9 of them said they felt more confident to attend classical Sage Days after the event.

What are the chances you attend a

We took advantage of the diverse knowledge background of our group to work together and learn from each other. It was an occasion for many “first times” among participants who had very little experience with Sage:

  • 5 participants installed a source version of Sage for the first time (so that they could edit the source).
  • 3 used git for the first time.
  • 5 used git within Sage for the first time.
  • 11 got their first Trac account .
  • 5 got their first contribution to a Sage ticket.
  • 8 are in the process of getting their first code integrated to Sage.

We worked on 14 tickets during the week, 6 of those which have been merged since the conference. All participants said they had learned new things and it would impact their careers.

Did you learn new things at this conference? 1:0 people, 2: 0 people, 3: 2 people, 4: 6 people, 5: 9 people

Did you think what you learned will have an impact on your future research/career? 1:0 people, 2: 0 people, 3: 1 people, 4: 10 people, 5: 6 people

This also was an occasion to start projects and form more research and development collaborations for future.

Did you meet interesting people? 1:0 people, 2: 0 people, 3: 0 people, 4: 2 people, 5: 15 people

Have you started (or carried on) any project that could lead to more research and development in the future? I have started things and will try to follow up: 38.8%. I have started things and willdefinitely follow up: 35.3%. Nothing: 5.3%.

All of this happened in a very casual and welcoming atmosphere. We used the common rooms of the house to work. We cooked international, vegetarian friendly meals (some participants had brought food and recipes from their home countries). We got to know each other and shared more than code. All participants agreed that it was a very positive experience. When asked to rate the general atmosphere of the conference, all of them gave a 5.

How did you like the general atmosphere of the conference? 1:0 people, 2: 0 people, 3: 0 people, 4: 0 people, 5: 17 people

As an organizer, it was also very rewarding and it motivates me to do it again. To the question: “Any other comment you might have?”, we only got one answer.

All three organizers were so very generous with their time and expertise, and created a wonderful supportive environment. Thank-you!

OpenDreamKit: The story behind our website

$
0
0

OpenDreamKit uses a static website powered by Jekyll and GitHub. Ever wondered what it means? Read this post to discover.

OpenDreamKit: Steering Committee meeting before the 1st Project Review

$
0
0

Participants

A framadate poll was created

Were present on the steering committee day:

Nicolas THIERY; Benoît PILORGET; Erik BRAY; Viviane PONS; Vincent DELECROIX; Michael KOHLHASE; Dennis MUELLER; Florian RABE; Tom WIESING; Clément PERNET; Wolfram DECKER; William HART; Dmitrii PASECHNIK; Marcin KOSTUR; Mike CROUCHER; Hans FANGOHR; Alexander KONOVALOV; Stephen LINTON; Luca DE FEO; John CREMONA; Paul-Olivier DEHAYE; Benjamin RAGAN-KELLEY; Jeroen DEMEYER; Konrad HINSEN

Agenda

  • Second amendment to the Grant
  • WP7: overview of the situation and of the measures taken and to be planned
  • Overview of the deliverables due for M18
  • Best practice for the Project Review

Minutes

Second amendment to the Grant

Benoît Pilorget (BP) announced that the Second Amendment should be over in April-May. All the modifications concerning deliverables and the scientific context were accepted. The remaining blocking points were purely administrative and require some time. At the moment these notes are being written (19/05/2017), the Commission seems to have fully agreed on all terms and is about to sign the amendment.

Related to this amendment, the consortium expressed their congratulations to Hans Fangohr (HF) for his new position at XFEL, in Hamburg. All points of the amendment can be found on the github issue #193

WP7: overview of the situation and of the measures taken and to be planned:

An open brainstorming session took place. Resulting from the retirement of Ursula Martin, it appears that some aspects of WP7 that require research-grade expertise in sociology will be hardly achievable as it is organised today with the current consortium. Therefore solutions must be found so that we don’t just tick the boxes but actually deliver high quality material.

Several options have been discussed:

1) Hire new staff specialised in sociology or likewise field. This solution would probably lead to the transfer of some funding within the consortium, unless it turns out enough Person-Months are planned at UOXF

2) Subcontract the planned work not feasible. For this solution to work out, one must find an adequate subcontractor (providing enough funds are available within UOXF or the consortium) and sign an amendment to the Grant with the Commission

3) Rethink the scientific content (objectives, tasks, deliverables), to take into account all we have learned since the writing of the proposal, and make the best use of the available ressources and consortium expertise. This of course would require a negotiation with the EU and probably a new amendment to the grant agreement.

The consortium is expecting official feedback from the Project Officer and reviewers after the formal review. In the meantime, the Coordinator and Principal Investigators of WP7 will be informally brainstorming all possibilities. Were an amendment necessary, it will be written after the current amendment for the addition of FAU Erlangen and XFEL is signed by the Commission.

Overview of the deliverables due for M18 and 24

After a tour de table, the Coordinator ensured that all deliverables due for Month 24 (31/08/2017) have a leader and a definite working plan.

Best practice for the Project Review:

BP reminded the consortium of the support slides for the Review that were presentend at the Edinburgh steering committee meeting.

Feedback from the Quality Review Board

HF, the chair of the Quality Review Board (QRB), expressed rough positive feedback from the first QRB meeting. A full report will be made available for all participants.

Viewing all 414 articles
Browse latest View live