Nueva publicación

Encontrar

Artículo
· 7 jul, 2024 Lectura de 1 min

InterSystems 常见问题系列 如何在启动时执行特定动作

InterSystems 常见问题FAQ

如果您想在InterSystems 产品启动时执行一个操作系统可执行文件,命令或者程序,可以在SYSTEM^%ZSTART routine里面写明流程 ( %ZSTART routine在 %SYS 命名空间里面创建).

在 SYSTEM^%ZSTART 里面写代码之前, 请确保他可以在任何情况下能正常工作

如果 ^%ZSTART routine 写的不对,或者没有响应或者发生错误,InterSystems 产品可能会无法启动。

更多信息,请参考一下文档。

About writing %ZSTART and %ZSTOP routines [IRIS]
About writing %ZSTART and %ZSTOP routines

Comentarios (0)0
Inicie sesión o regístrese para continuar
Artículo
· 7 jul, 2024 Lectura de 4 min

InterSystems 常见问题系列 如何检查数据大小

InterSystems  常见问题系列FAQ

InterSystems 产品里数据 (表、对象、实例数据) 是存在global 变量里的。
每个global 的数据大小可以从管理门户中中点击属性查看Management Portal > System > Configuration > Local Database > Globals page, 然后在global 属性页点击计算大小Calculate Size 按钮。
你可以在终端上调用^%GSIZE  来在命名空间里显示数据大小,方法如下.

USER>do ^%GSIZE
 
Directory name: c:\intersystems\ensemble\mgr\user\ =>
All Globals? No => Yes
^DeepSee.ActiveTasks contains no data
Include it anyway? No => Y
Include any other similar globals without asking again? Yes =>
^DeepSee.ActiveTasks contains no data
Include it anyway? No => Yes
Include any other similar globals without asking again? Yes => Yes
^DeepSee.FeatureStats contains no data -- included
^DeepSee.Session contains no data -- included
^oddBIND     contains no data -- included
^oddMETA     contains no data -- included
^oddStudioDocument contains no data -- included
^oddStudioMenu contains no data -- included
^rINCSAVE    contains no data -- included
91 items selected from
91 available globals
Show details?? No => Yes
Device:
Right margin: 80 =>
directory: c:\intersystems\ensemble\mgr\user\                                   Page: 1                           GLOBAL SIZE                        26 Jun 2017
                                                                         6:56 PM
      Global        Blocks       Bytes Used  Packing   Contig.
      --------    --------  ---------------  -------   -------
      CacheMsg           1            3,812     47 %         0
      DeepSee.ActiveTasks
                         1               24      0 %         0
      DeepSee.AgentLog
                         1            6,008     74 %         0
      DeepSee.Agents
                         1              688      8 %         0
      DeepSee.BucketList
                         1               76      1 %         0
      DeepSee.Cache.Axis
                        25          142,616     70 %        14
      DeepSee.Cache.Listing
                        15           87,728     72 %        11
      DeepSee.Cache.Results
                        31          183,200     72 %        17
      DeepSee.Cubes
                         3           17,936     73 %         0
                                         to continue or '^' to STOP:
Comentarios (0)0
Inicie sesión o regístrese para continuar
Artículo
· 7 jul, 2024 Lectura de 2 min

InterSystems 常见问题系列如何从FTP 服务器上传/下载影像文件

InterSystems 常见问题系列FAQ

流程如下

1. 上传到 FTP server

 set tmpfile="c:\temp\test.jpg"
 set ftp=##class(%Net.FtpSession).%New() 
 // connect to FTP server
 do ftp.Connect("","<username>","<password>")
 // set transfer mode to BINARY
 do ftp.Binary()
 // Move to the directory to upload
 do ftp.SetDirectory("/temp/upload")
 // Prepare a stream of files to upload  
 set file=##class(%File).%New(tmpfile)
 do file.Open("UK\BIN\")
 // upload file
 // 1st argument: File name to create at upload destination
 // 2nd argument: File stream to upload
 do ftp.Store("test.jpg",file)
 // Logout from ftp server
 do ftp.Logout()
 // close the file
 do file.Close()
 // (Optional) Delete the uploaded file
 //do ##class(%File).Delete(tmpfile)

2. 从FTP服务器下载

   set ftp=##class(%Net.FtpSession).%New()     // Connect to ftp server
    do ftp.Connect("","<username>","<password>")     // Set the transfer mode to BINARY
    do ftp.Binary()     // Prepare a file stream to download and store
    set stream=##class(%FileBinaryStream).%New()
    do stream.LinkToFile("c:\temp\testdownload.jpg")
   // Go to the download directory
    do ftp.SetDirectory("/temp/download")     // Download the file and close the stream
    do ftp.Retrieve("test.jpg",stream)
    do stream.SaveStream()
    Set stream=""     // Logout from the ftp server
    do ftp.Logout()

Comentarios (0)0
Inicie sesión o regístrese para continuar
Anuncio
· 7 jul, 2024

Key Questions of the Month: June 2024

Hi Community,

It's time for the new batch of #KeyQuestions from the previous month.

4 Types of Job Interview Questions to Help You Dig Deeper | Robert Half

Here are the Key Questions of June chosen by InterSystems Experts within all Communities:

📌 Business Rule Editor Changes by @Scott Roth (EN)

📌 Python interaction with Config.config class not returning gmheap size by @Veerraju Grandhi (EN)

📌 Condition sur un objet dynamique vide by @Julia Pertin (FR)

These questions will be highlighted with the #Key Question tag, and their authors will get the Key Question badge on Global Masters (when it's back).

If you find the key question(s) from other communities interesting, just drop us a line in the comments and we will translate the question(s) and the accepted answer(s).

Congrats, and thank you all for your interesting questions. Keep them coming!

See you next month😉

Comentarios (0)1
Inicie sesión o regístrese para continuar
Pregunta
· 7 jul, 2024

Cómo entrenar "realmente" un modelo de aprendizaje automático

Hola a todos,

Hace unos días vi a un youtuber hablando de cómo crear una red neuronal (en español)

En resumen, utiliza la red neuronal para aprender a convertir grados Celsius a grados Fahrenheit.
Grados Fahrenheit= (Grados  Celsius × 9/5) +32

En este vídeo utiliza Python para crear la red neuronal, donde crea una tabla con los valores de grados Celsius y grados Fahrenheit.
Luego hace 1000 entrenamientos al modelo que ha creado, cuando consulta la predicción a un valor que no está en la tabla que ha utilizado para entrenar, le da un valor correcto (o bastante cercano).

Bueno, quería hacer el mismo ejemplo usando IRIS e Intersystems IntegratedML, así que creé una tabla con los dos valores y siguiendo las instrucciones de "Introducción al aprendizaje automático"

Class St.MLL.celsiusFahrenheit Extends %Persistent
{

/// Value of Celsius
Property Celsius As %Decimal;
/// Value of Fahrenheit
Property Fahrenheit As %Decimal;
/// Populate table
ClassMethod Populate() As %Status
{
    &sql(INSERT INTO St_MLL.celsiusFahrenheit VALUES(-40,-40))
    &sql(INSERT INTO St_MLL.celsiusFahrenheit VALUES(-10,14))
    &sql(INSERT INTO St_MLL.celsiusFahrenheit VALUES(0,32))
    &sql(INSERT INTO St_MLL.celsiusFahrenheit VALUES(8,46))
    &sql(INSERT INTO St_MLL.celsiusFahrenheit VALUES(15,59))
    &sql(INSERT INTO St_MLL.celsiusFahrenheit VALUES(22,72))
    &sql(INSERT INTO St_MLL.celsiusFahrenheit VALUES(38,100))
    Return $$$OK
}

ClassMethod Training() As %Status
{
    write "Creating model celsiusFahrenheitModel",!
    &sql(CREATE MODEL celsiusFahrenheitModel PREDICTING (Fahrenheit) FROM St_MLL.celsiusFahrenheit)
    write "Training model",!
    for i=1:1:100
    {
        &sql(TRAIN MODEL celsiusFahrenheitModel As FirstModel)
        write "Step "_i_" of 100",!
    }
    write "Validate model celsiusFahrenheitModel",!
    &sql(VALIDATE MODEL celsiusFahrenheitModel FROM St_MLL.celsiusFahrenheit)
}

}

Hice lo mismo, entrenando el modelo 100 veces.

He creado otra tabla con los valores para probar el modelo.

Class St.MLL.celsiusTest Extends %Persistent
{

/// Value of Celsius
Property Celsius As %Decimal;
/// Value of Fahrenheit
Property Fahrenheit As %Decimal;
/// Populate table
ClassMethod Populate() As %Status
{
    &sql(INSERT INTO St_MLL.celsiusTest VALUES(10,0))
    &sql(INSERT INTO St_MLL.celsiusTest VALUES(20,0))
    &sql(INSERT INTO St_MLL.celsiusTest VALUES(30,0))
    &sql(INSERT INTO St_MLL.celsiusTest VALUES(40,0))
    &sql(INSERT INTO St_MLL.celsiusTest VALUES(50,0))
    &sql(INSERT INTO St_MLL.celsiusTest VALUES(60,0))
    &sql(INSERT INTO St_MLL.celsiusTest VALUES(70,0))
    Return $$$OK
}
}

Pero no parece funcionar porque siempre devuelve el mismo valor de predicción.

USER > do ##class(St.MLL.celsiusFahrenheit).Populate()
USER > do ##class(St.MLL.celsiusFahrenheit).Training()
Creating model celsiusFahrenheitModel
Training model
Step 1 of 100
Step 2 of 100
Step 3 of 100
Step 4 of 100
......
Step 99 of 100
Step 100 of 100
Validate model celsiusFahrenheitModel
USER > do ##class(St.MLL.celsiusTest).Populate()
USER >

Estaba esperando:

Celisu Fahrenheit prediction
10 0 50
20 0 68
30 0 86
40 0 104
50 0 122
60 0 140
70 0 158

Creí que, una vez entrenado el modelo, podría predecir qué valor le corresponde, porque no sabemos cuál es el valor en Fahrenheit.
¿Qué se está haciendo mal? ¿Estoy intentando hacer algo que no es posible? Es decir, que mi modelo aprenda cuál es el patrón y yo solo tengo que preguntar el valor de la predicción de mi modelo según el valor de los grados centígrados.

Muchas gracias

2 comentarios
Comentarios (2)1
Inicie sesión o regístrese para continuar