#Embedded Python

0 Followers · 283 Posts

Embedded Python refers to the integration of the Python programming language into the InterSystems IRIS kernel, allowing developers to operate with data and develop business logic for server-side applications using Python.

Documentation.

Article Henry Pereira · May 18, 2024 5m read

 

Current triage systems often rely on the experience of admitting physicians. This can lead to delays in care for some patients, especially when faced with inexperienced residents or non-critical symptoms. Additionally, it can result in unnecessary hospital admissions, straining resources and increasing healthcare costs.

We focused our project on pregnant women and conducted a survey with friends of ours who work at a large hospital in São Paulo, Brazil, specifically in the area of monitoring and caring for pregnant women.

0
0 181
Article Crystal Cheong · May 18, 2024 3m read

ChatIRIS Health Coach, a GPT-4 based agent that leverages the Health Belief Model as a psychological framework to craft empathetic replies. This article elaborates on the backend architecture and its components, focusing on how InterSystems IRIS supports the system's functionality.

0
0 191
Article Ikram Shah · May 12, 2024 5m read

 

Problem

Do you resonate with this - A capability and impact of a technology being truly discovered when it's packaged in a right way to it's audience. Finest example would be, how the Generative AI took off when ChatGPT was put in the public for easy access and not when Transformers/RAG's capabilities were identified. At least a much higher usage came in, when the audience were empowered to explore the possibilities.  

Motivation

0
0 480
Article shan yue · May 15, 2024 2m read

Hi Community,

In this article, I will introduce my application iris-image-vector-search.
The image vector retrieval demo uses IRIS Embedded Python and OpenAI CLIP model to convert images into 512 dimensional vector data. Through the new feature of Vector Search, VECTOR-COSINE is used to calculate similarity and display high similarity images.

Application direction of image retrieval  

Image retrieval has important application scenarios in the medical field, and using image retrieval can greatly improve work efficiency. Image retrieval can also be applied in the following fields, such as:

0
0 216
Article Muhammad Waseem · May 13, 2024 3m read

Hi Community,
In this article, I will introduce my application iris-VectorLab along with step by step guide to performing vector operations.

IRIS-VectorLab is a web application that demonstrates the functionality of Vector Search with the help of embedded python. It leverages the functionality of the Python framework SentenceTransformers for state-of-the-art sentence embeddings.

Application Features

0
0 447
Announcement Olga Zavrazhnova · Apr 9, 2024

Hi Developers,

Join us at the upcoming Developer Roundtable on April 25th at 9 am ET | 3 pm CET. 📍
We will have 2 topics covered by the invited experts and open discussion as always.

Tech Talks:
➡ Practical Usage of Embedded Python - by Stefan Wittmann Product Manager, InterSystems

▶ Recording: 

 

0
0 187
Article Robbie Luman · Jan 12, 2024 7m read

With the advent of Embedded Python, a myriad of use cases are now possible from within IRIS directly using Python libraries for more complex operations. One such operation is the use of natural language processing tools such as textual similarity comparison.

Setting up Embedded Python to Use the Sentence Transformers Library

3
3 582
Question Pietro Di Leo · Apr 17, 2024

Hello everybody, 

I've been experimenting with Embedded Python and have been following the steps outlined in this documentation: https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cl…

I'm trying to convert a python dictionary into an objectscript array but there is an issue with the 'arrayref' function, that is not working as in the linked example.

This is a snapshoot of my IRIS terminal: 

0
0 199
Question Stephane Devin · Apr 10, 2024

Hi,

I am using embeded python to utilize some pythonic library but i got a problem on my hand.
One of the python function i am using return multiple values

in python you would do something like that :

val1, val2, val3, = function(params)

In COS I got something like that :

lib = ##class(%SYS.Python).Import("lib")
val1 = lib.function(params)

And I don't know how to get the second and third values.
Is there a way to get them?

0
0 206
Article Luis Angel Pérez Ramos · Nov 4, 2023 5m read

I recently had the need to monitor from HealthConnect the records present in a NoSQL database in the Cloud, more specifically Cloud Firestore, deployed in Firebase. With a quick glance I could see how easy it would be to create an ad-hoc Adapter to make the connection taking advantage of the capabilities of Embedded Python, so I got to work.

Preparing the environment

To start, we need an instance of the database on which we can perform the tests. By accessing the Firebase console, we have created a new project to which we have added the Firestore database.

0
1 431
Article Luis Angel Pérez Ramos · Mar 27, 2024 6m read

As you have seen in the latest community publications, InterSystems IRIS has included since version 2024.1 the possibility of including vector data types in its database and based on this type of data vector searches have been implemented. Well, these new features reminded me of the article I published a while ago that was based on facial recognition using Embedded Python.

Introduction

0
0 469
Question Adrian Maguire · Feb 18, 2022

Hi, I am trying to use embedded python in a cache class, but I can only get it to work in the source code namespace.

We map our client namespaces to our source code namespaces using Default Database for Routines under System > Configuration > Namespaces > Edit Namespace in the management portal.

In the source code namespace:

SOURCENEW>w ##class(EF.helloWorld).helloWorldPython()

Hello World!

SOURCENEW>ZN "EVEXAMPLE"

In the client namespace:

EVEXAMPLE>w ##class(EF.helloWorld).helloWorldPython()

W ##CLASS(EF.helloWorld).helloWorldPython()

^

<OBJECT DISPATCH> *python object not found

2
2 517
Announcement Emily Geary · Feb 29, 2024

Hi All,

On February 8, 2024, we asked for input from the IRIS community regarding exam topics for our InterSystems IRIS Developer Professional exam. We will close the window for providing feedback on the exam topics on Friday, March 8, 2024. If you would like to have your say in what topics are covered on the exam, this is your last chance!

How can I access the survey? You can access it here

0
0 133
Announcement Emily Geary · Feb 8, 2024

Hello Everyone,

The Certification Team of InterSystems Learning Services is developing an InterSystems IRIS Developer Professional certification exam, and we are reaching out to our community for feedback that will help us evaluate and establish the contents of this exam.

Note: This exam will replace the current InterSystems IRIS Core Solutions Developer Specialist exam when it is released. Please note from the target role description below that the focus of the new exam will be more on developer best practices and a lot less on the ObjectScript programming language.

0
0 343
Article Sylvain Guilbaud · Feb 1, 2024 5m read

Hello Community,

SQL language remains the most practical way to retrieve information stored in a database.

The JSON format is very often used in data exchange.

It is therefore common to seek to obtain data in JSON format from SQL queries.

Below you will find simple examples that can help you meet this need using ObjectScript and Python code.

ObjectScript : using Dynamic SQL with %SQL.StatementJSON structures with %DynamicObject and %DynamicArray

1
2 466
Article Oliver Wilms · Feb 3, 2024 2m read

The architect of the JSON schema (MS) asked if IRIS could  perform schema validation. I asked on Discord objectscript channel how we could validate a Dynamic Object against a JSON schema. Dmitry Maslennikov replied that probably the easiest way would be to use python, but it would require converting ObjectScript JSON to Python dict.

I refer to this as my first real use case for Embedded Python, because previous examples I had tried I could have implemented in ObjectScript just as easily as in Python.

0
0 253
Question Cyril Grosjean · Jan 2, 2024

Hi,

I'm trying to access to my datas stored in a RecordMap from SQLAlchemy, and I need to access to any tables already created before using SQLAlchemy.

Here is some part of my code :

TestBase:

classTestBase(DeclarativeBase):
    CreatedAt: Mapped[int] = mapped_column(TIMESTAMP, default=func.now())
    UpdatedAt: Mapped[int] = mapped_column(TIMESTAMP, default=func.now(), onupdate=func.current_timestamp())

 

Engine creation and entities binding :

0
0 131
Announcement Bob Kuszewski · Dec 14, 2023

Embedded Python is about to get a whole lot more powerful, and we’re looking for a few volunteers to give it a try.

What’s the Flexible Python Runtime?

The Flexible Python Runtime option allows you to use a Python runtime of your choosing with Embedded Python. Previous to this, you could only use the operating system's default Python, which was limiting especially for customers using the latest and greatest AI & ML tools close to their data.

1
0 331
Article Evgeny Shvarov · Sep 3, 2023 5m read

While starting the development with IRIS we have a distribution kit or in case of Docker we are pulling the docker image and then often we need to initialize it and setup the development environment. We might need to create databases, namespaces, turn on/off some services, create resources. We often need to import code and data into IRIS instance and run some custom code to init the solution.

1
3 691
Question Nay Chi Lynn · Nov 23, 2023

I'm currently facing an issue with a Python script in my IRISHealth environment and would appreciate your insights.

I've written a class method, `getTokenCount`, in Python, which uses the `tiktoken` module. However, when I run the script in the terminal using `do ##class(python.openaiUtils).getTokenCount("")`, I encounter the following error:

```
<THROW> *%Exception.PythonException <THROW> 230 ^^0^DO ##CLASS(python.openaiUtils).Test() <class 'ModuleNotFoundError'>: No module named 'tiktoken.core' -
```

3
0 373
Announcement Luis Angel Pérez Ramos · Oct 19, 2023

It's true! QuinielaML has incorporated the most important leagues in Europe (and Brazil) into its prediction service, so, dear members of the Developer Community, wherever you are from, you will be able to have the predictions of your favorite leagues at your disposal.

From the predictions screen you will have access to each of the new leagues included, being able to record the matches for each journey:

0
0 164