Not able to launch Pyleecan

Dear All,
Well, everything was working fine till afternoon.
I installed Anaconda and now I cant launch Pyleecan from the command prompt...
Are these are related to each other ?.
How to resolve the issue please?
C:\Users\Haris>python -m pyleecan
Traceback (most recent call last):
File "C:\Users\Haris\AppData\Local\Programs\Python\Python38\lib\runpy.py", line 194, in _run_module_as_main
return run_code(code, main_globals, None,
File "C:\Users\Haris\AppData\Local\Programs\Python\Python38\lib\runpy.py", line 87, in run_code
exec(code, run_globals)
File "c:\users\haris\downloads\pyleecan-1.4.2.tar\pyleecan-1.4.2\pyleecan-1.4.2\pyleecan_main.py", line 2, in
from .run_GUI import run_GUI
File "c:\users\haris\downloads\pyleecan-1.4.2.tar\pyleecan-1.4.2\pyleecan-1.4.2\pyleecan\run_GUI.py", line 15, in
from .GUI.Dialog.DMachineSetup.DMachineSetup import DMachineSetup
File "C:\Users\Haris\AppData\Local\Programs\Python\Python38\Lib\site-packages\shiboken2\files.dir\shibokensupport_feature.py", line 142, in import
return original_import(name, *args, **kwargs)
File "c:\users\haris\downloads\pyleecan-1.4.2.tar\pyleecan-1.4.2\pyleecan-1.4.2\pyleecan\GUI\Dialog\DMachineSetup\DMachineSetup.py", line 11, in
from ....GUI.Dialog.DMachineSetup.SPreview.SPreview import SPreview
File "C:\Users\Haris\AppData\Local\Programs\Python\Python38\Lib\site-packages\shiboken2\files.dir\shibokensupport_feature.py", line 142, in import
return original_import(name, *args, **kwargs)
File "c:\users\haris\downloads\pyleecan-1.4.2.tar\pyleecan-1.4.2\pyleecan-1.4.2\pyleecan\GUI\Dialog\DMachineSetup\SPreview\SPreview.py", line 8, in
from .....GUI.Dialog.DMachineSetup.SPreview.Ui_SPreview import Ui_SPreview
File "C:\Users\Haris\AppData\Local\Programs\Python\Python38\Lib\site-packages\shiboken2\files.dir\shibokensupport_feature.py", line 142, in import
return original_import(name, *args, **kwargs)
File "c:\users\haris\downloads\pyleecan-1.4.2.tar\pyleecan-1.4.2\pyleecan-1.4.2\pyleecan\GUI\Dialog\DMachineSetup\SPreview\Ui_SPreview.py", line 12, in
from .....GUI.Dialog.DMachineSetup.SPreview.WMachineTable.WMachineTable import (
File "C:\Users\Haris\AppData\Local\Programs\Python\Python38\Lib\site-packages\shiboken2\files.dir\shibokensupport_feature.py", line 142, in import
return original_import(name, *args, **kwargs)
File "c:\users\haris\downloads\pyleecan-1.4.2.tar\pyleecan-1.4.2\pyleecan-1.4.2\pyleecan\GUI\Dialog\DMachineSetup\SPreview\WMachineTable\WMachineTable.py", line 8, in
from ......Classes.InputCurrent import InputCurrent
File "C:\Users\Haris\AppData\Local\Programs\Python\Python38\Lib\site-packages\shiboken2\files.dir\shibokensupport_feature.py", line 142, in import
return original_import(name, *args, **kwargs)
File "c:\users\haris\downloads\pyleecan-1.4.2.tar\pyleecan-1.4.2\pyleecan-1.4.2\pyleecan\Classes\InputCurrent.py", line 21, in
from ..Methods.Simulation.InputCurrent.gen_input import gen_input
File "C:\Users\Haris\AppData\Local\Programs\Python\Python38\Lib\site-packages\shiboken2\files.dir\shibokensupport_feature.py", line 142, in import
return original_import(name, *args, **kwargs)
File "c:\users\haris\downloads\pyleecan-1.4.2.tar\pyleecan-1.4.2\pyleecan-1.4.2\pyleecan\Methods\Simulation\InputCurrent\gen_input.py", line 6, in
from ....Classes.ElecLUTdq import ElecLUTdq
File "C:\Users\Haris\AppData\Local\Programs\Python\Python38\Lib\site-packages\shiboken2\files.dir\shibokensupport_feature.py", line 142, in import
return original_import(name, *args, **kwargs)
File "c:\users\haris\downloads\pyleecan-1.4.2.tar\pyleecan-1.4.2\pyleecan-1.4.2\pyleecan\Classes\ElecLUTdq.py", line 21, in
from ..Methods.Simulation.ElecLUTdq.run import run
File "C:\Users\Haris\AppData\Local\Programs\Python\Python38\Lib\site-packages\shiboken2\files.dir\shibokensupport_feature.py", line 142, in import
return original_import(name, *args, **kwargs)
File "c:\users\haris\downloads\pyleecan-1.4.2.tar\pyleecan-1.4.2\pyleecan-1.4.2\pyleecan\Methods\Simulation\ElecLUTdq\run.py", line 4, in
from ....Classes.OutLoss import OutLoss
File "C:\Users\Haris\AppData\Local\Programs\Python\Python38\Lib\site-packages\shiboken2\files.dir\shibokensupport_feature.py", line 142, in import
return original_import(name, *args, **kwargs)
File "c:\users\haris\downloads\pyleecan-1.4.2.tar\pyleecan-1.4.2\pyleecan-1.4.2\pyleecan\Classes\OutLoss.py", line 46, in
from ..Methods.Output.OutLoss.store import store
File "C:\Users\Haris\AppData\Local\Programs\Python\Python38\Lib\site-packages\shiboken2\files.dir\shibokensupport_feature.py", line 142, in import
return original_import(name, *args, **kwargs)
File "c:\users\haris\downloads\pyleecan-1.4.2.tar\pyleecan-1.4.2\pyleecan-1.4.2\pyleecan\Methods\Output\OutLoss\store.py", line 4, in
from ....Classes.MeshSolution import MeshSolution
File "C:\Users\Haris\AppData\Local\Programs\Python\Python38\Lib\site-packages\shiboken2\files.dir\shibokensupport_feature.py", line 142, in import
return original_import(name, *args, **kwargs)
File "c:\users\haris\downloads\pyleecan-1.4.2.tar\pyleecan-1.4.2\pyleecan-1.4.2\pyleecan\Classes\MeshSolution.py", line 31, in
from ..Methods.Mesh.MeshSolution.get_field import get_field
File "C:\Users\Haris\AppData\Local\Programs\Python\Python38\Lib\site-packages\shiboken2\files.dir\shibokensupport_feature.py", line 142, in import
return original_import(name, *args, **kwargs)
File "c:\users\haris\downloads\pyleecan-1.4.2.tar\pyleecan-1.4.2\pyleecan-1.4.2\pyleecan\Methods\Mesh\MeshSolution\get_field.py", line 5, in
from ....Classes.MeshVTK import MeshVTK
File "C:\Users\Haris\AppData\Local\Programs\Python\Python38\Lib\site-packages\shiboken2\files.dir\shibokensupport_feature.py", line 142, in import
return original_import(name, *args, **kwargs)
File "c:\users\haris\downloads\pyleecan-1.4.2.tar\pyleecan-1.4.2\pyleecan-1.4.2\pyleecan\Classes\MeshVTK.py", line 72, in
from vtk import vtkPointSet
File "C:\Users\Haris\AppData\Local\Programs\Python\Python38\Lib\site-packages\shiboken2\files.dir\shibokensupport_feature.py", line 142, in import
return original_import(name, *args, **kwargs)
File "C:\Users\Haris\AppData\Local\Programs\Python\Python38\lib\site-packages\vtk.py", line 31, in
all_m = importlib.import_module('vtkmodules.all')
File "C:\Users\Haris\AppData\Local\Programs\Python\Python38\lib\importlib_init.py", line 127, in import_module
return _bootstrap.gcd_import(name[level:], package, level)
File "C:\Users\Haris\AppData\Local\Programs\Python\Python38\lib\site-packages\vtkmodules\all.py", line 92, in
from .vtkIOCONVERGECFD import *
File "C:\Users\Haris\AppData\Local\Programs\Python\Python38\Lib\site-packages\shiboken2\files.dir\shibokensupport_feature.py", line 142, in _import
return original_import(name, *args, **kwargs)
KeyboardInterrupt
^C

Hello,
Anaconda install several packages versions that may conflict with pyleecan ones. We used to recommend to use Anaconda but now we advise to use a clean python and VScode (cf https://pyleecan.org/get.pyleecan.html). In particular there were issue with Anaconda and pyleecan GUI that should still be there, so I would recommend not to use Anaconda with pyleecan if you plan to use the GUI.
Best regards,
Pierre

Sure I got rid of Anaconda and reinstalled 1.4.2. It seems to be working but I have found some other issues. Anyway I will clean it.
Where can I find detailed literature on winding, please?
I don't find details on adding the insulation paper details in the stator slot. If this property is not available what is the percentage we need to allocate in the slot fill factor?.

Hello,
Regarding winding, there are some information on the website: https://pyleecan.org/winding.convention.html
Regarding the fill factor, the slot surface is defined in step 3 "Stator Slot" then the active surface/insulation is defined at step 5 "Stator Conductor" and the fill factor is available as an output here:

Best regards,
Pierre

Dear Pierre,
Well, I'm still struggling to get the stator conductor information right.
Let me give you an example and in turn can you please show me how to fill in the details in the "Stator conductor Page" ( GUI). Please note I have entered the below in the stator winding page
Winding Pattern:
Slot Number =48
Pole pair number=4
Phases number=3
Layers number=1
Coil pitch=5
Turns per coil=60
Parallel circuits=1
I have below set of information I need to use

Motor has 48 slots and 8 poles ( 4 pole pairs). 3 Phase start connected motor
The coil details are as below
Number of Turns: 60
Wire Diameter ( in mm): 0.7239
Film thickness ( in mm): 0.0254
Number of Strands: 2
Insulator thickness( in mm) i.e. slot insulator paper: 0.13
No of wire Layers: 1

Guys can some one help me?.

Hello,
Sorry for the answer delay, I was in holiday last week. Regarding the winding definition you can refer to several ressources to understand pyleecan way of defining the winding:

https://pyleecan.org/winding.convention.html
In the GUI all fields should have a tooltip (by hovering your cursor over the field, you should have the definition of the parameter).
All the parameters are detailed in the corresponding csv files (https://github.com/Eomys/pyleecan/blob/master/pyleecan/Generator/ClassesRef/Machine/Winding.csv, https://github.com/Eomys/pyleecan/blob/master/pyleecan/Generator/ClassesRef/Machine/Conductor.csv, https://github.com/Eomys/pyleecan/blob/master/pyleecan/Generator/ClassesRef/Machine/CondType12.csv)
The code of the GUI detail which method is used for each output so you can check how it is computed: https://github.com/Eomys/pyleecan/blob/master/pyleecan/GUI/Dialog/DMachineSetup/SWindCond/WCondOut/WCondOut.py

Which parameter are you having issue with ?
Best regards,
Pierre

Dear Pierre,
I hope you had a great vacation/holiday.
Well I 'am trying to fill in the below details in Pyleecan GUI

Stator winding - Step 4 in GUI

Please note I have entered the below in the stator winding page
Winding Pattern:
Slot Number =48
Pole pair number=4 ( 8 poles)
Phases number=3
Layers number=1
Coil pitch=5
Turns per coil=60
Parallel circuits=1
This is absolutely clear to me in Pyleecan.

Stator Conductor - Step 5 in GUI

I am using the below link to enter magnet wire details
https://www.elektrisola.com/en-us/Products/Enamelled-Wire/Technical-Data#iec60317
EUROPE / ASIA IEC 60317
For example, if I want to use 2 strands of wire, 0.4 mm ( nominal diameter). Can you please let me know what should we fill in the fields displayed on Step 5 GUI ( Stator Conductor)?
Can you post a picture after you enter the details?
Regards,
Harish

Hello,
Based on your description, I guess that the correct parameters are Nwppc = 2 and Wwire = 0.4. Insulation parameters should be optional to set.
To check the definition you can use the output below. The important data to check is the Ksfill and the active surface (Scond_active). Once both these output are correct, you can then set Lewout (endwinding length) to correct the resistance and winding mass.
Best regards,
Pierre

Thanks

I will review it once thanks


Add a deadzone to Vive wand touchpads

Actions like jumping using a press of the right touchpad also triggers a slight turn, no matter how close to the center line of the touchpad you press.

Yeah the Vive wands sound like a nightmare to get working... Especially since I can't test them. Are there no deadzone settings in the SteamVR controller settings? Could you check that?

@Raicuparta There doesn't seem to be a way to add deadzones through Steam's key rebinding UI. It'll let me add deadzones to button presses if the trackpad is configured as a Dpad, but those button presses can't be tied to thumbstick actions.

@Raicuparta Also, and this is kind of tangential, but the trackpad button that Steam says is bound to Y (I think it's up on the left trackpad?) for some reason opens the start menu instead of equipping the signalscope. I don't know if that's something on your end, or something that Steam is somehow screwing up.

@Raicuparta Also, and this is kind of tangential, but the trackpad button that Steam says is bound to Y (I think it's up on the left trackpad?) for some reason opens the start menu instead of equipping the signalscope.

That is an undocumented feature. It's very confusing but eventually I'll make it less so. "Y" will open the main menu unless you are piloting the ship, in which case it opens the signalscope. Signalscope in character mode is supposed to be equipped only by grabbing it from the toolbelt.
I think the solution to this will be removing as many buttons as possible from the Vive trackpad clicks. For instance, in the latest releases the need for the X button is starting to disappear in character mode at least. If I keep with this progress, eventually we may only need a jump button and a back button, for instance.
Messing with deadzones in code will be impossible for me without having a Vive to test. Someone with a Vive would need to develop that.

@Z5aI69A61 A new version 0.20 is out. It changes the way joystick inputs is done, and allows the game do it its own deadzone and smoothing to the inputs, just like it did with a normal gamepad. Can you check if you still have this problem?
Keep in mind that the mappings may be different than last time you played, so please check the SteamVR controller settings to understand the mappings.

The deadzones work nicely. Yay!


how not using array as children when using JSX

How can I put an array as a child in JSX?
I cannot do something like ...props.children like:

  {...props.children}

I'm not entirely sure what you mean, you should be able to do

{props.children}

```

Oh sorry, I misunderstood the issue
this problem is exactly mentioned in https://github.com/dekujs/deku/blob/master/docs/hints/array-children.md
The following code will throw error, "TypeError: deku: Child nodes can't be an array. "

  {props.children}

I was asking about if there is any way to solve without changing the HTML structure using JSX
Or I will need to create a seperated DIV for storing props.children
If no, I would like to make a PR about No solution for JSX in array-children.md


App crashes when updating main screen after "Toggle in-call status bar"

Hello,
in my app, I'm reacting on the change of the statusBarHeight to move objects further up or down. Basically, my main screen looks like that:
      <View style={[styles.flex1, this.getStatusBarHeight()]}>
        <Navigator
           ...
         />
      </View>

The method "getStatusBarHeight()" returns "20 - currentStatusBarHeight", which is again triggered by using @brentvatne s status bar size update snippet (https://github.com/brentvatne/react-native-status-bar-size).
I dont know since which version exactly, but on 0.4.4, I get the following error stack:
2015-05-17 15:50:27.008 [error][tid:com.facebook.React.JavaScript] "Error: null is not an object (evaluating 'prevComponentInstance._currentElement')
stack:
_updateRenderedComponent                 index.ios.bundle:17090
_performComponentUpdate                  index.ios.bundle:17072
updateComponent                          index.ios.bundle:16992
ReactCompositeComponent_updateComponent  index.ios.bundle:5155
receiveComponent                         index.ios.bundle:16856
receiveComponent                         index.ios.bundle:5283
updateChildren                           index.ios.bundle:21467
_updateChildren                          index.ios.bundle:21232
updateChildren                           index.ios.bundle:21206
receiveComponent                         index.ios.bundle:18568
receiveComponent                         index.ios.bundle:5283
_updateRenderedComponent                 index.ios.bundle:17093
_performComponentUpdate                  index.ios.bundle:17072
updateComponent                          index.ios.bundle:16992
ReactCompositeComponent_updateComponent  index.ios.bundle:5155
receiveComponent                         index.ios.bundle:16856
receiveComponent                         index.ios.bundle:5283
_updateRenderedComponent                 index.ios.bundle:17093
_performComponentUpdate                  index.ios.bundle:17072
updateComponent                          index.ios.bundle:16992
ReactCompositeComponent_updateComponent  index.ios.bundle:5155
receiveComponent                         index.ios.bundle:16856
receiveComponent                         index.ios.bundle:5283
_updateRenderedComponent                 index.ios.bundle:17093
_performComponentUpdate                  index.ios.bundle:17072
updateComponent                          index.ios.bundle:16992
ReactCompositeComponent_updateComponent  index.ios.bundle:5155
receiveComponent                         index.ios.bundle:16856
receiveComponent                         index.ios.bundle:5283
updateChildren                           index.ios.bundle:21467
_updateChildren                          index.ios.bundle:21232
updateChildren                           index.ios.bundle:21206
receiveComponent                         index.ios.bundle:18568
receiveComponent                         index.ios.bundle:5283
_updateRenderedComponent                 index.ios.bundle:17093
_performComponentUpdate                  index.ios.bundle:17072
updateComponent                          index.ios.bundle:16992
ReactCompositeComponent_updateComponent  index.ios.bundle:5155
receiveComponent                         index.ios.bundle:16856
receiveComponent                         index.ios.bundle:5283
_updateRenderedComponent                 index.ios.bundle:17093
_performComponentUpdate                  index.ios.bundle:17072
updateComponent                          index.ios.bundle:16992
ReactCompositeComponent_updateComponent  index.ios.bundle:5155
receiveComponent                         index.ios.bundle:16856
receiveComponent                         index.ios.bundle:5283
updateChildren                           index.ios.bundle:21467
_updateChildren                          index.ios.bundle:21232
updateChildren                           index.ios.bundle:21206
receiveComponent                         index.ios.bundle:18568
receiveComponent                         index.ios.bundle:5283
_updateRenderedComponent                 index.ios.bundle:17093
_performComponentUpdate                  index.ios.bundle:17072
updateComponent                          index.ios.bundle:16992
ReactCompositeComponent_updateComponent  index.ios.bundle:5155
receiveComponent                         index.ios.bundle:16856
receiveComponent                         index.ios.bundle:5283
_updateRenderedComponent                 index.ios.bundle:17093
_performComponentUpdate                  index.ios.bundle:17072
updateComponent                          index.ios.bundle:16992
ReactCompositeComponent_updateComponent  index.ios.bundle:5155
receiveComponent                         index.ios.bundle:16856
receiveComponent                         index.ios.bundle:5283
updateChildren                           index.ios.bundle:21467
_updateChildren                          index.ios.bundle:21232
updateChildren                           index.ios.bundle:21206
receiveComponent                         index.ios.bundle:18568
receiveComponent                         index.ios.bundle:5283
_updateRenderedComponent                 index.ios.bundle:17093
_performComponentUpdate                  index.ios.bundle:17072
updateComponent                          index.ios.bundle:16992
ReactCompositeComponent_updateComponent  index.ios.bundle:5155
receiveComponent                         index.ios.bundle:16856
receiveComponent                         index.ios.bundle:5283
_updateRenderedComponent                 index.ios.bundle:17093
_performComponentUpdate                  index.ios.bundle:17072
updateComponent                          index.ios.bundle:16992
ReactCompositeComponent_updateComponent  index.ios.bundle:5155
performUpdateIfNecessary                 index.ios.bundle:16889
performUpdateIfNecessary                 index.ios.bundle:5301
runBatchedUpdates                        index.ios.bundle:4860
perform                                  index.ios.bundle:6287
perform                                  index.ios.bundle:6287
perform                                  index.ios.bundle:4804
flushBatchedUpdates                      index.ios.bundle:4884
ReactUpdates_flushBatchedUpdates         index.ios.bundle:5155
closeAll                                 index.ios.bundle:6360
perform                                  index.ios.bundle:6301
batchedUpdates                           index.ios.bundle:14131
batchedUpdates                           index.ios.bundle:4819
                                index.ios.bundle:7772
applyWithErrorReporter                   index.ios.bundle:7524
guardReturn                              index.ios.bundle:7546
processBatch                             index.ios.bundle:7771
URL: http://localhost:8081/index.ios.bundle
line: 17090
message: null is not an object (evaluating 'prevComponentInstance._currentElement')"
In case it is absolutely necessary, I can try to build my app back to a working version to determine since which version this is not working anymore, but since it would take several hours, I'd like to avoid it.
Regards
Philipp

@brentvatne have you ever seen an error stack like this using your snippet?

@PhilippKrone - does this happen even if you remove the status bar sizing code? Seems like a Navigator issue

@PhilippKrone - going to close this issue for now, if you're still having this issue it would be awesome if you could reopen with a runnable example as per contributing guidelines

@brentvatne I still have this issue, but am not able to make a runnable example.. Any chance to have a discussion, so I can focus my effort here?

@philikon - sure - I've never run into this issue, as per the above comment - if you take out the status bar related code, does it still crash?

Yea, its not working without the status bar code as well. It seems like a re-render (either triggered via setState or via forceUpdate()) is resulting in this error stack.

I would remove all calls to forceUpdate and see if that fixes it

Hi, I think @brentvatne mentioned me by mistake, but I'm happy to chime in:
We use Navigator.js heavily in Facebook's Ads Manager app (in fact, that's mostly what it was written for). You can get it to adapt to the varying window height when on a call / tethering / etc. without the need for forceUpdate and changing styles:
<Navigator
  sceneStyle={styles.scene}
  />

with styles.scene being
{
  marginTop: Navigator.NavigationBar.Styles.General.TotalNavHeight,
  top: 0,
  left: 0,
  right: 0,
  bottom: 0,
}

By not setting an explicit height, the view will simply adapt when the window size changes due to the status bar expanding.

Haha, sorry @philikon I indeed mention you by mistake ;) Best mistake I've made today

@philikon Do you still get the error when you debug the app in chrome? I get a similar stack trace when changing a listview's datasource, but only if I run the app on the device, when I debug the app in chrome everything works :confused:

I'm seeing the same error with Navigator and I'm not using forceUpdate and it's only happening on device, not when running in the Chrome debugger... I thought running in the Safari debugger might give more info but it's broken (see #2464). @despairblue did you manage to fix it?

Turns out it was a completely unrelated error in one of my components render method that was failing and crashing with this very obscure error when setting the state... Check that all your components are rendering normally if you see this error!

+1 @cosmith

Doesn't this.getStatusBarHeight() return a number, and not a style object? In that case you shouldn't be passing it directly to style prop.

@facebook-github-bot answered

Closing this issue as @jsierles says the question asked has been answered. Please help us by asking questions on StackOverflow. StackOverflow is amazing for Q&A: it has a reputation system, voting, the ability to mark a question as answered. Because of the reputation system it is likely the community will see and answer your question there. This also helps us use the GitHub bug tracker for bugs only.


Fix warning about memory leak in tests [21177]

Description
Fixes next message:
swig/python detected a memory leak of type 'eprosima::fastrtps::ResourceLimitedVector< unsigned char >::pointer *', no destructor found.

@Mergifyio backport 1.4.x 1.2.x

Contributor Checklist

[x] Commit messages follow the project guidelines.
[x] Tests that thoroughly check the new feature have been added/Regression tests checking the bug and its fix have been added; the added tests pass locally
[x] Changes are API compatible.
[x] Applicable backports have been included in the description.

Reviewer Checklist

[x] The PR has a milestone assigned.
[x] The title and description correctly express the PR's purpose.
[x] Check contributor checklist is correct.
[x] Check CI results: changes do not issue any warning.
[x] Check CI results: failing tests are unrelated with the changes.

@Mergifyio backport 1.4.x 1.2.x


Link in readme broken

https://github.com/onix-labs/onixlabs-dotnet/blob/main/README.md?plain=1#L1
404: Not Found

Readme will be fixed in version 5.0


azure - functions bugs and write to blob storage

Several bugs preventing policies from executing in functions
Plumb a Session down into StorageUtilities to allow for auth in functions and update notify action too
Support execution options and output_dir
Update docs to show how to write to blob storage
Improve logging
Handle timeout on status check to dead function app

local_session(Session) won't work in functions, it has to be created with Azure.session_factory but a few places where we need sessions outside of policies sometimes weren't doing that, this plumbs through sessions with policy context - and thus sessions based off an auth file specified in config.
And.... it works :)

I broke a test I'll fix shortly


[REQUEST] - Update documentation for gguf models for both embeddings and inference

Reference Issues
No response
Summary
instructions for using gguf locally for both embeddings and model.
Basic Example
I tried to get this setup to work with text-generation-webui openai api endpoint, but it threw errors on the embeddings... I see gguf local model support is supported, but without clear instructions on how to implement it (how/where do I specify in .env or in ui) I'm not sure how to implement it.
Drawbacks
no drawbacks, simply asking for updated documentation
Additional information
No response

If you already have openai api compatible endpoints, you can add a new LLM model and a new Embedding model using those endpoints by following these steps https://cinnamon.github.io/kotaemon/usage/#1-add-your-ai-models (also available in the Help tab within the UI). Please ignore the .env file, it's only used for the first time you start the app, it won't have any effect in subsequent runs. Please give it a try.

Anyway, our team is workin on both the setup scripts and more clear document to setup local model (Ollama, GGUF) in the README directly. Stay tuned.

Meanwhile you can try the suggestion from @lone17 here first.

If you followed this guide https://github.com/oobabooga/text-generation-webui/wiki/12-‐-OpenAI-API to set up your endpoint, the endpoint URL you need to add to kotaemon would be http://<IP_ADDRESS>:5000/v1/. Something like this

I tried to follow those instructions in the url.  They don't really explain how to setup gguf properly.  Pictures would be nice.  For example, in this thread, you say not to use the .env, but in the url it says to use the .env, and then they show a bunch of parms for llama.cpp but there is no input fields for those parms.  It is not clear by how adding a name only, the model path will be inferred locally (for example... if I choose a gguf model... how does the ui know what quantized version I want or know where the path is locally without asking for it in the ui?)

If you followed this guide https://github.com/oobabooga/text-generation-webui/wiki/12-‐-OpenAI-API to set up your endpoint, the endpoint URL you need to add to kotaemon would be http://<IP_ADDRESS>:5000/v1/. Something like this

thank you.  This got me past my error(s)!

well, that did get me past one error, but not the embedding error

Thinking ...
Retrievers [DocumentRetrievalPipeline(DS=<kotaemon.storages.docstores.lancedb.LanceDBDocumentStore object at 0x7fc670142b60>, FSPath=PosixPath('/home/user/kotaemon/ktem_app_data/user_data/files/index_1'), Index=<class 'ktem.index.file.index.IndexTable'>, Source=<class 'ktem.index.file.index.Source'>, VS=<kotaemon.storages.vectorstores.chroma.ChromaVectorStore object at 0x7fc670142e00>, get_extra_table=False, llm_scorer=LLMTrulensScoring(concurrent=True, normalize=10, prompt_template=<kotaemon.llms.prompts.template.PromptTemplate object at 0x7fc66c1df520>, system_prompt_template=<kotaemon.llms.prompts.template.PromptTemplate object at 0x7fc66c1df640>, top_k=3, user_prompt_template=<kotaemon.llms.prompts.template.PromptTemplate object at 0x7fc66c1df730>), mmr=True, rerankers=[CohereReranking(cohere_api_key='', model_name='rerank-multilingual-v2.0')], retrieval_mode='hybrid', top_k=10, user_id=1), GraphRAGRetrieverPipeline(DS=<theflow.base.unset_ object at 0x7fc6b0aa0a30>, FSPath=<theflow.base.unset_ object at 0x7fc6b0aa0a30>, Index=<class 'ktem.index.file.index.IndexTable'>, Source=<theflow.base.unset_ object at 0x7fc6b0aa0a30>, VS=<theflow.base.unset_ object at 0x7fc6b0aa0a30>, file_ids=[], user_id=<theflow.base.unset_ object at 0x7fc6b0aa0a30>)]
searching in doc_ids ['4914ae98-3916-4aef-8e95-f7b67971b6f2', '0d4527a2-567b-4971-a52f-46a9ee38dd8a', '3f0fc6c2-c402-445d-9a12-45f15780699a']
retrieval_kwargs: dict_keys(['do_extend', 'scope', 'filters', 'mode', 'mmr_threshold'])
Traceback (most recent call last):
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/gradio/queueing.py", line 575, in process_events
    response = await route_utils.call_process_api(
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/gradio/route_utils.py", line 276, in call_process_api
    output = await app.get_blocks().process_api(
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/gradio/blocks.py", line 1923, in process_api
    result = await self.call_function(
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/gradio/blocks.py", line 1520, in call_function
    prediction = await utils.async_iteration(iterator)
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/gradio/utils.py", line 663, in async_iteration
    return await iterator.__anext__()
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/gradio/utils.py", line 656, in __anext__
    return await anyio.to_thread.run_sync(
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/anyio/to_thread.py", line 56, in run_sync
    return await get_async_backend().run_sync_in_worker_thread(
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 2177, in run_sync_in_worker_thread
    return await future
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 859, in run
    result = context.run(func, *args)
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/gradio/utils.py", line 639, in run_sync_iterator_async
    return next(iterator)
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/gradio/utils.py", line 801, in gen_wrapper
    response = next(iterator)
  File "/home/user/kotaemon/libs/ktem/ktem/pages/chat/__init__.py", line 804, in chat_fn
    for response in pipeline.stream(chat_input, conversation_id, chat_history):
  File "/home/user/kotaemon/libs/ktem/ktem/reasoning/simple.py", line 660, in stream
    docs, infos = self.retrieve(message, history)
  File "/home/user/kotaemon/libs/ktem/ktem/reasoning/simple.py", line 488, in retrieve
    retriever_docs = retriever_node(text=query)
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/theflow/base.py", line 1097, in __call__
    raise e from None
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/theflow/base.py", line 1088, in __call__
    output = self.fl.exec(func, args, kwargs)
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/theflow/backends/base.py", line 151, in exec
    return run(*args, **kwargs)
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/theflow/middleware.py", line 144, in __call__
    raise e from None
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/theflow/middleware.py", line 141, in __call__
    _output = self.next_call(*args, **kwargs)
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/theflow/middleware.py", line 117, in __call__
    return self.next_call(*args, **kwargs)
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/theflow/base.py", line 1017, in _runx
    return self.run(*args, **kwargs)
  File "/home/user/kotaemon/libs/ktem/ktem/index/file/pipelines.py", line 162, in run
    docs = self.vector_retrieval(text=text, top_k=self.top_k, **retrieval_kwargs)
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/theflow/base.py", line 1261, in exec
    return child(*args, **kwargs, __fl_runstates__=__fl_runstates__)
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/theflow/base.py", line 1097, in __call__
    raise e from None
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/theflow/base.py", line 1088, in __call__
    output = self.fl.exec(func, args, kwargs)
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/theflow/backends/base.py", line 151, in exec
    return run(*args, **kwargs)
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/theflow/middleware.py", line 144, in __call__
    raise e from None
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/theflow/middleware.py", line 141, in __call__
    _output = self.next_call(*args, **kwargs)
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/theflow/middleware.py", line 117, in __call__
    return self.next_call(*args, **kwargs)
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/theflow/base.py", line 1017, in _runx
    return self.run(*args, **kwargs)
  File "/home/user/kotaemon/libs/kotaemon/kotaemon/indices/vectorindex.py", line 188, in run
    emb = self.embedding(text)[0].embedding
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/theflow/base.py", line 1261, in exec
    return child(*args, **kwargs, __fl_runstates__=__fl_runstates__)
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/theflow/base.py", line 1675, in __call__
    return self._create_callable(getattr(self.ff_original_obj, "__call__"))(
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/theflow/base.py", line 1663, in wrapper
    raise e from None
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/theflow/base.py", line 1661, in wrapper
    output = callable_obj(*args, **kwargs)
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/theflow/middleware.py", line 144, in __call__
    raise e from None
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/theflow/middleware.py", line 141, in __call__
    _output = self.next_call(*args, **kwargs)
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/theflow/middleware.py", line 117, in __call__
    return self.next_call(*args, **kwargs)
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/theflow/base.py", line 1261, in exec
    return child(*args, **kwargs, __fl_runstates__=__fl_runstates__)
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/theflow/base.py", line 1097, in __call__
    raise e from None
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/theflow/base.py", line 1088, in __call__
    output = self.fl.exec(func, args, kwargs)
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/theflow/backends/base.py", line 151, in exec
    return run(*args, **kwargs)
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/theflow/middleware.py", line 144, in __call__
    raise e from None
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/theflow/middleware.py", line 141, in __call__
    _output = self.next_call(*args, **kwargs)
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/theflow/middleware.py", line 117, in __call__
    return self.next_call(*args, **kwargs)
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/theflow/base.py", line 1017, in _runx
    return self.run(*args, **kwargs)
  File "/home/user/kotaemon/libs/kotaemon/kotaemon/embeddings/base.py", line 10, in run
    return self.invoke(text, *args, **kwargs)
  File "/home/user/kotaemon/libs/kotaemon/kotaemon/embeddings/openai.py", line 104, in invoke
    resp = self.openai_response(client, input=input_, **kwargs).dict()
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/tenacity/__init__.py", line 289, in wrapped_f
    return self(f, *args, **kw)
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/tenacity/__init__.py", line 379, in __call__
    do = self.iter(retry_state=retry_state)
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/tenacity/__init__.py", line 326, in iter
    raise retry_exc from fut.exception()
tenacity.RetryError: RetryError[<Future at 0x7fc66c216620 state=finished raised InternalServerError>]

@thistleknot yeah sorry for that confusing instruction. The .env section was a different way to set up GGUF models, if you already have an API endpoint deployed using text-generation-webui, please ignore that part.

After you change the embedding model, you also need to switch to using it in the File Index Collection like described here https://github.com/Cinnamon/kotaemon/issues/143#issuecomment-2315620503
You might also need to do this step as well https://github.com/Cinnamon/kotaemon/issues/143#issuecomment-2315646439

Please try it out, sorry for not having clear instructions, the team is working on it.

tried the fast embeddings route using the default fast embedding option

Thinking ...
Retrievers [DocumentRetrievalPipeline(DS=<kotaemon.storages.docstores.lancedb.LanceDBDocumentStore object at 0x7f435c882e90>, FSPath=PosixPath('/home/user/kotaemon/ktem_app_data/user_data/files/index_1'), Index=<class 'ktem.index.file.index.IndexTable'>, Source=<class 'ktem.index.file.index.Source'>, VS=<kotaemon.storages.vectorstores.chroma.ChromaVectorStore object at 0x7f435c883130>, get_extra_table=False, llm_scorer=LLMTrulensScoring(concurrent=True, normalize=10, prompt_template=<kotaemon.llms.prompts.template.PromptTemplate object at 0x7f435812d300>, system_prompt_template=<kotaemon.llms.prompts.template.PromptTemplate object at 0x7f435812cdc0>, top_k=3, user_prompt_template=<kotaemon.llms.prompts.template.PromptTemplate object at 0x7f435812fb50>), mmr=True, rerankers=[CohereReranking(cohere_api_key='', model_name='rerank-multilingual-v2.0')], retrieval_mode='hybrid', top_k=10, user_id=1), GraphRAGRetrieverPipeline(DS=<theflow.base.unset_ object at 0x7f439d0a0a30>, FSPath=<theflow.base.unset_ object at 0x7f439d0a0a30>, Index=<class 'ktem.index.file.index.IndexTable'>, Source=<theflow.base.unset_ object at 0x7f439d0a0a30>, VS=<theflow.base.unset_ object at 0x7f439d0a0a30>, file_ids=[], user_id=<theflow.base.unset_ object at 0x7f439d0a0a30>)]
searching in doc_ids ['4914ae98-3916-4aef-8e95-f7b67971b6f2', '0d4527a2-567b-4971-a52f-46a9ee38dd8a', '3f0fc6c2-c402-445d-9a12-45f15780699a']
retrieval_kwargs: dict_keys(['do_extend', 'scope', 'filters', 'mode', 'mmr_threshold'])
Traceback (most recent call last):
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/gradio/queueing.py", line 575, in process_events
    response = await route_utils.call_process_api(
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/gradio/route_utils.py", line 276, in call_process_api
    output = await app.get_blocks().process_api(
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/gradio/blocks.py", line 1923, in process_api
    result = await self.call_function(
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/gradio/blocks.py", line 1520, in call_function
    prediction = await utils.async_iteration(iterator)
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/gradio/utils.py", line 663, in async_iteration
    return await iterator.__anext__()
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/gradio/utils.py", line 656, in __anext__
    return await anyio.to_thread.run_sync(
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/anyio/to_thread.py", line 56, in run_sync
    return await get_async_backend().run_sync_in_worker_thread(
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 2177, in run_sync_in_worker_thread
    return await future
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 859, in run
    result = context.run(func, *args)
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/gradio/utils.py", line 639, in run_sync_iterator_async
    return next(iterator)
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/gradio/utils.py", line 801, in gen_wrapper
    response = next(iterator)
  File "/home/user/kotaemon/libs/ktem/ktem/pages/chat/__init__.py", line 804, in chat_fn
    for response in pipeline.stream(chat_input, conversation_id, chat_history):
  File "/home/user/kotaemon/libs/ktem/ktem/reasoning/simple.py", line 660, in stream
    docs, infos = self.retrieve(message, history)
  File "/home/user/kotaemon/libs/ktem/ktem/reasoning/simple.py", line 488, in retrieve
    retriever_docs = retriever_node(text=query)
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/theflow/base.py", line 1097, in __call__
    raise e from None
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/theflow/base.py", line 1088, in __call__
    output = self.fl.exec(func, args, kwargs)
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/theflow/backends/base.py", line 151, in exec
    return run(*args, **kwargs)
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/theflow/middleware.py", line 144, in __call__
    raise e from None
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/theflow/middleware.py", line 141, in __call__
    _output = self.next_call(*args, **kwargs)
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/theflow/middleware.py", line 117, in __call__
    return self.next_call(*args, **kwargs)
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/theflow/base.py", line 1017, in _runx
    return self.run(*args, **kwargs)
  File "/home/user/kotaemon/libs/ktem/ktem/index/file/pipelines.py", line 162, in run
    docs = self.vector_retrieval(text=text, top_k=self.top_k, **retrieval_kwargs)
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/theflow/base.py", line 1261, in exec
    return child(*args, **kwargs, __fl_runstates__=__fl_runstates__)
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/theflow/base.py", line 1097, in __call__
    raise e from None
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/theflow/base.py", line 1088, in __call__
    output = self.fl.exec(func, args, kwargs)
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/theflow/backends/base.py", line 151, in exec
    return run(*args, **kwargs)
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/theflow/middleware.py", line 144, in __call__
    raise e from None
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/theflow/middleware.py", line 141, in __call__
    _output = self.next_call(*args, **kwargs)
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/theflow/middleware.py", line 117, in __call__
    return self.next_call(*args, **kwargs)
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/theflow/base.py", line 1017, in _runx
    return self.run(*args, **kwargs)
  File "/home/user/kotaemon/libs/kotaemon/kotaemon/indices/vectorindex.py", line 188, in run
    emb = self.embedding(text)[0].embedding
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/theflow/base.py", line 1261, in exec
    return child(*args, **kwargs, __fl_runstates__=__fl_runstates__)
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/theflow/base.py", line 1675, in __call__
    return self._create_callable(getattr(self.ff_original_obj, "__call__"))(
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/theflow/base.py", line 1663, in wrapper
    raise e from None
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/theflow/base.py", line 1661, in wrapper
    output = callable_obj(*args, **kwargs)
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/theflow/middleware.py", line 144, in __call__
    raise e from None
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/theflow/middleware.py", line 141, in __call__
    _output = self.next_call(*args, **kwargs)
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/theflow/middleware.py", line 117, in __call__
    return self.next_call(*args, **kwargs)
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/theflow/base.py", line 1261, in exec
    return child(*args, **kwargs, __fl_runstates__=__fl_runstates__)
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/theflow/base.py", line 1097, in __call__
    raise e from None
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/theflow/base.py", line 1088, in __call__
    output = self.fl.exec(func, args, kwargs)
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/theflow/backends/base.py", line 151, in exec
    return run(*args, **kwargs)
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/theflow/middleware.py", line 144, in __call__
    raise e from None
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/theflow/middleware.py", line 141, in __call__
    _output = self.next_call(*args, **kwargs)
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/theflow/middleware.py", line 117, in __call__
    return self.next_call(*args, **kwargs)
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/theflow/base.py", line 1017, in _runx
    return self.run(*args, **kwargs)
  File "/home/user/kotaemon/libs/kotaemon/kotaemon/embeddings/base.py", line 10, in run
    return self.invoke(text, *args, **kwargs)
  File "/home/user/kotaemon/libs/kotaemon/kotaemon/embeddings/openai.py", line 104, in invoke
    resp = self.openai_response(client, input=input_, **kwargs).dict()
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/tenacity/__init__.py", line 289, in wrapped_f
    return self(f, *args, **kw)
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/tenacity/__init__.py", line 379, in __call__
    do = self.iter(retry_state=retry_state)
  File "/home/user/miniconda3/envs/kotaemon/lib/python3.10/site-packages/tenacity/__init__.py", line 326, in iter
    raise retry_exc from fut.exception()
tenacity.RetryError: RetryError[<Future at 0x7f43582c9120 state=finished raised InternalServerError>]

After changing the embedding for the File Collection like mentioned in https://github.com/Cinnamon/kotaemon/issues/143#issuecomment-2315620503, have you tried restarting the app ? Sorry I couldn't test your set up now, so I will briefly describe how the app works, maybe it could help you with debugging.
Basically there are 3 main components we need to care about:

the LLM model which is used for generation, scoring, reranking, etc. If you have an openai compatible endpoint, you can simply use the OpenAIChat option and then change the URL and the key to your local ones.
the Embedding model which is used for turning text into embedding vectors. Similarly to the LLM, you can simply drop in your openai compatible endpoint to use it.
then there is the File Collection, which is the thing that processes your documents and stores the embeddings to use for retrieval later. Each Collection uses an Embedding model. This embedding model is configured once when the Collection is created (a default File Collection is created as you start the app for the first time), and shouldn't be changed after such creation (because you don't want to store embeddings produced by different models together as they would have different distributions). But technically you can still change it by following https://github.com/Cinnamon/kotaemon/issues/143#issuecomment-2315620503, but you would need to restart the app for the change to take effect.
there's also the Graph Collection but let's ignore it for now as setting it up locally is rather tricky.

In your fast embedding logs, it looks like that the app still uses the OpenAIEmbeddings connector, so I guess you haven't changed the embedding model of the File Collection or you haven't restart the app. (the app needs to be restarted because these settings are stored in a db, when the app starts it will read from the db to set up the corresponding models. When you make changes to the settings/specifications, it will update the db but doesn't reload the model, hence the need for a restart).
Hope that helps. The team is working on a better doc, I hope it will come out soon. Note I'm not a part of the team so I cannot promise anything on their behalf, but I'm sure they are working hard on it. Thank you for your interest in this project, I hope this hiccup doesn't discourage you from supporting it in the future.

I got further
I went back to the basics and constructed a minimum viable example of a curl call
curl http://<IP_ADDRESS>:5000/v1/embeddings   -H "Content-Type: application/json"   -H "Authorization: Bearer blahblahblah"   -d '{
    "input": "Your text goes here",
    "model": "text-embedding-ada-002"
  }'

this told me I had to change the name of the model to text-embedding-ada-002 (despite what is in settings.yaml, although I think in settings.yaml, you still need to specify the backend model that will be used in place, the port is still 5000 for text-generation-webui)

then I went in the file setting as someone had pointed out and swapped 'openai' with 'local'

so far no errors, but no inference either

changing settings and asking to restart is a no go with a docker container fyi
in fact, restarting the docker container wipes out everything
I can't set the llm for relevant scoring, I think that's what is causing the below error in docker (while everything else seems to work) and stops the response short at just a single word
retrieval step took 8.569526195526123
[2024-09-01 01:55:26,512][INFO] - Downloading https://dl.fbaipublicfiles.com/fasttext/supervised-models/lid.176.ftz to lid.176.ftz (916.0K)
100%|█████████████████████████████████████████████████████████████| 916k/916k [00:00<00:00, 1.48MB/s]
lang en
highlight_text Nau, Au, Ilghami, Kuter, Murdock, Wu, & Yaman true
lang en
highlight_text SHOP2: An HTN Planning System true
lang en
highlight_text Table 3: Resolution Methods for Task Interactions in true
lang en
highlight_text Nau, Au, Ilghami, Kuter, Murdock, Wu, & Yaman true
lang en
highlight_text consider when analysing the planners a resource hierarchy, as shown in Figure 8. Each element of the hierarchy is true
lang en
highlight_text hyper-parameter, a multinomial distribution can be true
lang en
highlight_text 3.1.2 Expressiveness true
lang en
highlight_text SHOP2: An HTN Planning System true
lang en
highlight_text Nau, Au, Ilghami, Kuter, Murdock, Wu, & Yaman true
lang en
highlight_text •Variables can be allowed or not in the planning problem. true
Got 10 retrieved documents
len (original) 29626
len (trimmed) 29626
Got 3 images
Trying LLM streaming
CitationPipeline: invoking LLM
Exception in thread Thread-13 (generate_relevant_scores):
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.10/threading.py", line 953, in run
    self._target(*self._args, **self._kwargs)
  File "/app/libs/ktem/ktem/reasoning/simple.py", line 668, in generate_relevant_scores
    docs = self.retrievers[0].generate_relevant_scores(message, docs)
  File "/app/libs/ktem/ktem/index/file/pipelines.py", line 206, in generate_relevant_scores
    else self.llm_scorer(documents=documents, query=query)
  File "/usr/local/lib/python3.10/site-packages/theflow/base.py", line 1097, in __call__
    raise e from None
  File "/usr/local/lib/python3.10/site-packages/theflow/base.py", line 1088, in __call__
    output = self.fl.exec(func, args, kwargs)
  File "/usr/local/lib/python3.10/site-packages/theflow/backends/base.py", line 151, in exec
    return run(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/theflow/middleware.py", line 144, in __call__
    raise e from None
  File "/usr/local/lib/python3.10/site-packages/theflow/middleware.py", line 141, in __call__
    _output = self.next_call(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/theflow/middleware.py", line 117, in __call__
    return self.next_call(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/theflow/base.py", line 1017, in _runx
    return self.run(*args, **kwargs)
  File "/app/libs/kotaemon/kotaemon/indices/rankings/llm_trulens.py", line 150, in run
    results = [future.result() for future in futures]
  File "/app/libs/kotaemon/kotaemon/indices/rankings/llm_trulens.py", line 150, in <listcomp>
    results = [future.result() for future in futures]
  File "/usr/local/lib/python3.10/concurrent/futures/_base.py", line 458, in result
    return self.__get_result()
  File "/usr/local/lib/python3.10/concurrent/futures/_base.py", line 403, in __get_result
    raise self._exception
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/app/libs/kotaemon/kotaemon/indices/rankings/llm_trulens.py", line 146, in llm_call
    return self.llm(messages).text
  File "/usr/local/lib/python3.10/site-packages/theflow/base.py", line 1097, in __call__
    raise e from None
  File "/usr/local/lib/python3.10/site-packages/theflow/base.py", line 1088, in __call__
    output = self.fl.exec(func, args, kwargs)
  File "/usr/local/lib/python3.10/site-packages/theflow/backends/base.py", line 151, in exec
    return run(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/theflow/middleware.py", line 144, in __call__
    raise e from None
  File "/usr/local/lib/python3.10/site-packages/theflow/middleware.py", line 141, in __call__
    _output = self.next_call(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/theflow/middleware.py", line 117, in __call__
    return self.next_call(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/theflow/base.py", line 1017, in _runx
    return self.run(*args, **kwargs)
  File "/app/libs/kotaemon/kotaemon/llms/base.py", line 25, in run
    return self.invoke(*args, **kwargs)
  File "/app/libs/kotaemon/kotaemon/llms/chats/openai.py", line 204, in invoke
    resp = self.openai_response(
  File "/app/libs/kotaemon/kotaemon/llms/chats/openai.py", line 313, in openai_response
    return client.chat.completions.create(**params)
  File "/usr/local/lib/python3.10/site-packages/openai/_utils/_utils.py", line 274, in wrapper
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/openai/resources/chat/completions.py", line 668, in create
    return self._post(
  File "/usr/local/lib/python3.10/site-packages/openai/_base_client.py", line 1260, in post
    return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls))
  File "/usr/local/lib/python3.10/site-packages/openai/_base_client.py", line 937, in request
    return self._request(
  File "/usr/local/lib/python3.10/site-packages/openai/_base_client.py", line 1041, in _request
    raise self._make_status_error_from_response(err.response) from None
openai.AuthenticationError: Error code: 401 - {'error': {'message': 'Incorrect API key provided: openai_key. You can find your API key at https://platform.openai.com/account/api-keys.', 'type': 'invalid_request_error', 'param': None, 'code': 'invalid_api_key'}}
^[[DUser-id: 1, can see public conversations: True

^CKeyboard interruption in main thread... closing server.
^CTraceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/gradio/blocks.py", line 2690, in block_thread
    time.sleep(0.1)
KeyboardInterrupt

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/app/app.py", line 17, in <module>
    demo.queue().launch(
  File "/usr/local/lib/python3.10/site-packages/gradio/blocks.py", line 2595, in launch
    self.block_thread()
  File "/usr/local/lib/python3.10/site-packages/gradio/blocks.py", line 2694, in block_thread
    self.server.close()
  File "/usr/local/lib/python3.10/site-packages/gradio/http_server.py", line 68, in close
    self.thread.join(timeout=5)
  File "/usr/local/lib/python3.10/threading.py", line 1100, in join
    self._wait_for_tstate_lock(timeout=max(timeout, 0))
  File "/usr/local/lib/python3.10/threading.py", line 1116, in _wait_for_tstate_lock
    if lock.acquire(block, timeout):
KeyboardInterrupt
^CException ignored in atexit callback: <function exit_cacert_ctx at 0x7fab042de290>
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/certifi/core.py", line 10, in exit_cacert_ctx
Exception ignored in atexit callback: <function _exit_function at 0x7f8454b14310>
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/multiprocessing/util.py", line 320, in _exit_function
    def exit_cacert_ctx() -> None:
KeyboardInterrupt:
    def _exit_function(info=info, debug=debug, _run_finalizers=_run_finalizers,

Hi @thistleknot, you can persist app state by mounting /app/ktem_app/data folder outside.
Something like:
docker run \
-e GRADIO_SERVER_NAME=<IP_ADDRESS> \
-e GRADIO_SERVER_PORT=7860 \
-v ./ktem_app_data:/app/ktem_app_data \
-p 7860:7860 -it \
taprosoft/kotaemon-demo:v1.0

All of your data and app state will be stored in the path ./ktem_app_data so it persists across runs.
For your LLM relevant score problem please check our Local model setup guide.

those instructions don't specify the need to setup a different embedding
model
On Sun, Sep 1, 2024 at 2:02 AM Tuan Anh Nguyen Dang (Tadashi_Cin) <
@.***> wrote:

Hi @thistleknot https://github.com/thistleknot, you can persist app
state by mounting /app/ktem_app/data folder outside.
Something like:
docker run
-e GRADIO_SERVER_NAME=<IP_ADDRESS>
-e GRADIO_SERVER_PORT=7860
-v ./ktem_app_data:/app/ktem_app_data
-p 7860:7860 -it
taprosoft/kotaemon-demo:v1.0
All of your data and app state will be stored in the path ./ktem_app_data
so it persists across runs.
For your LLM relevant score problem please check our Local model setup
guide https://github.com/Cinnamon/kotaemon/blob/main/docs/local_model.md
.
—
Reply to this email directly, view it on GitHub
https://github.com/Cinnamon/kotaemon/issues/150#issuecomment-2323242283,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABHKKOV5RJTEPO2JUWWC6D3ZULJZPAVCNFSM6AAAAABNKWGKQWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMRTGI2DEMRYGM
.
You are receiving this because you were mentioned.Message ID:
@.***>

docker run -e GRADIO_SERVER_NAME=<IP_ADDRESS> -e GRADIO_SERVER_PORT=7860 -v /data/ktem_app_data:/app/ktem_app_data -p 7860:7860 -it --rm taprosoft/kotaemon:v1.0
Reasoning class <class 'ktem.reasoning.simple.FullQAPipeline'>
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/gradio/queueing.py", line 536, in process_events
    response = await route_utils.call_process_api(
  File "/usr/local/lib/python3.10/site-packages/gradio/route_utils.py", line 276, in call_process_api
    output = await app.get_blocks().process_api(
  File "/usr/local/lib/python3.10/site-packages/gradio/blocks.py", line 1923, in process_api
    result = await self.call_function(
  File "/usr/local/lib/python3.10/site-packages/gradio/blocks.py", line 1520, in call_function
    prediction = await utils.async_iteration(iterator)
  File "/usr/local/lib/python3.10/site-packages/gradio/utils.py", line 663, in async_iteration
    return await iterator.__anext__()
  File "/usr/local/lib/python3.10/site-packages/gradio/utils.py", line 656, in __anext__
    return await anyio.to_thread.run_sync(
  File "/usr/local/lib/python3.10/site-packages/anyio/to_thread.py", line 56, in run_sync
    return await get_async_backend().run_sync_in_worker_thread(
  File "/usr/local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 2177, in run_sync_in_worker_thread
    return await future
  File "/usr/local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 859, in run
    result = context.run(func, *args)
  File "/usr/local/lib/python3.10/site-packages/gradio/utils.py", line 639, in run_sync_iterator_async
    return next(iterator)
  File "/usr/local/lib/python3.10/site-packages/gradio/utils.py", line 801, in gen_wrapper
    response = next(iterator)
  File "/app/libs/ktem/ktem/pages/chat/__init__.py", line 785, in chat_fn
    pipeline, reasoning_state = self.create_pipeline(
  File "/app/libs/ktem/ktem/pages/chat/__init__.py", line 752, in create_pipeline
    iretrievers = index.get_retriever_pipelines(
  File "/app/libs/ktem/ktem/index/file/index.py", line 423, in get_retriever_pipelines
    obj = cls.get_pipeline(stripped_settings, self.config, selected_ids)
  File "/app/libs/ktem/ktem/index/file/pipelines.py", line 281, in get_pipeline
    embedding=embedding_models_manager[
  File "/app/libs/ktem/ktem/embeddings/manager.py", line 65, in __getitem__
    return self._models[key]
KeyError: 'local'

I think having a video of starting from scratch would help, but that's just me.  That way there is no way a step was missed.

I got a little bit further

but it stops after one word.

docker run --name kotaemon -e GRADIO_SERVER_NAME=<IP_ADDRESS> -e
GRADIO_SERVER_PORT=7860 -v /data/ktem_app_data:/app/ktem_app_data -p
7860:7860 -it taprosoft/kotaemon:v1.0
persists the settings, but not the document store
On Sun, Sep 1, 2024 at 2:02 AM Tuan Anh Nguyen Dang (Tadashi_Cin) <
@.***> wrote:

Hi @thistleknot https://github.com/thistleknot, you can persist app
state by mounting /app/ktem_app/data folder outside.
Something like:
docker run
-e GRADIO_SERVER_NAME=<IP_ADDRESS>
-e GRADIO_SERVER_PORT=7860
-v ./ktem_app_data:/app/ktem_app_data
-p 7860:7860 -it
taprosoft/kotaemon-demo:v1.0
All of your data and app state will be stored in the path ./ktem_app_data
so it persists across runs.
For your LLM relevant score problem please check our Local model setup
guide https://github.com/Cinnamon/kotaemon/blob/main/docs/local_model.md
.
—
Reply to this email directly, view it on GitHub
https://github.com/Cinnamon/kotaemon/issues/150#issuecomment-2323242283,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABHKKOV5RJTEPO2JUWWC6D3ZULJZPAVCNFSM6AAAAABNKWGKQWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMRTGI2DEMRYGM
.
You are receiving this because you were mentioned.Message ID:
@.***>

I'm going to close this

I did eventually get kotaemon working =D
thank you
I think I had my embedding model spelled incorrectly
for others
    docker run \
    -e GRADIO_SERVER_NAME=<IP_ADDRESS> \
    -e GRADIO_SERVER_PORT=7860 \
    -p 7860:7860 -it --rm \
    -v /data/ktem_app_data:/app/ktem_app_data \
    -it ghcr.io/cinnamon/kotaemon:main-full

how I started my server.py
python server.py --api --listen --n-gpu-layers 32 --threads 8 --numa --tensorcores --trust-remote-code
(textgen) [root@pve-m7330 text-generation-webui]# head settings.yaml  -n 20
openai-embedding_device: cuda
openai-embedding_model: "sentence-transformers/all-MiniLM-L6-v2"
openai-sd_webui_url: http://<IP_ADDRESS>:7861
openai-debug: 1

I'm going to close this
I did eventually get kotaemon working =D

thank you
I think I had my embedding model spelled incorrectly
for others
    docker run \
    -e GRADIO_SERVER_NAME=<IP_ADDRESS> \
    -e GRADIO_SERVER_PORT=7860 \
    -p 7860:7860 -it --rm \
    -v /data/ktem_app_data:/app/ktem_app_data \
    -it ghcr.io/cinnamon/kotaemon:main-full

how I started my server.py
python server.py --api --listen --n-gpu-layers 32 --threads 8 --numa --tensorcores --trust-remote-code
(textgen) [root@pve-m7330 text-generation-webui]# head settings.yaml -n 20 openai-embedding_device: cuda openai-embedding_model: "sentence-transformers/all-MiniLM-L6-v2" openai-sd_webui_url: http://<IP_ADDRESS>:7861 openai-debug: 1

this is fire, a write-up for it could be very helpful!


Installing yo get throw new ERR_OUT_OF_RANGE

Type of issue
Bug (error) when installing new yo with npm install -g yo

My environment

OS version/details: MacOS Mojave 10.14
Node version: 10.13.0
npm version: 6.4.1
Version of yo : 0

Expected behavior
Install should be smooth and can use yo after finish.
Current behavior
Can not use yo
Steps to reproduce the behavior
Run npm install -g yo
Command line output
Yeoman Doctor
Running sanity checks on your system

✔ Global configuration file is valid
✔ NODE_PATH matches the npm root
✔ Node.js version
✔ No .bowerrc file in home directory
✔ No .yo-rc.json file in home directory
util.js:371
    throw new ERR_OUT_OF_RANGE('err', 'a negative integer', err);
    ^

RangeError [ERR_OUT_OF_RANGE]: The value of "err" is out of range. It must be a negative integer. Received 536870174
    at Object.getSystemErrorName (util.js:371:11)
    at exceptionWithHostPort (internal/errors.js:333:21)
    at internalConnect (net.js:884:16)
    at defaultTriggerAsyncIdScope (internal/async_hooks.js:294:19)
    at GetAddrInfoReqWrap.emitLookup [as callback] (net.js:1031:9)
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:62:10)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR<EMAIL_ADDRESS>postinstall: `yodoctor`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the<EMAIL_ADDRESS>postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR!      /Users/sangdth/.npm/_logs/2018-11-03T19_04_20_826Z-debug.log

This looks like a Node error; which version are you using? Did you search Node.js bug tracker?

fix this problem after disable LuLu (proxy app) https://github.com/objective-see/LuLu/issues/150

Great.
This isn’t a yo bug.
Closing.


Glitch in the GMT pupil

Below is an example of where the GMT pupil has glitches around the edges. This problem goes away for an odd number of pixels.
import ceo
import sys
import datetime
import os.path
import numpy as np
import matplotlib.pyplot as plt
plt.ion()
gmt = ceo.GMT_MX()
D = 25.5
gmt.M2_baffle = 3.5    # Circular diameter pupil mask obscuration
gmt.project_truss_onaxis = True
nPx = 512 # number of pixels across D
gs = ceo.Source("R+I",zenith=0.,azimuth=0.,rays_box_size=D, rays_box_sampling=nPx, rays_origin=[0.0,0.0,25])
gs>>(gmt,)
~gmt
+gs
amplitude = gs.wavefront.amplitude.host().ravel()
phase_ref = gs.wavefront.phase.host().ravel()
validpts = np.where(amplitude)[0]
nphasevals = len(validpts)
~gmt
state = gmt.state
state['M1']['Rxyz'][3,1] = 1e-6
gmt^=state
+gs
temp = np.full(nPx**2, np.nan)
temp[validpts] = (gs.wavefront.phase.host().ravel() - phase_ref)[validpts]
plt.figure(1)
plt.clf()
wf = np.reshape(temp,(nPx,nPx))
plt.imshow(wf,interpolation='None', origin='lower')
plt.colorbar()
plt.show()
print(wf[80,337])
print(wf[80,338])
print(wf[80,339]) # this pixel is wrong!
print()
print(wf[84,337])
print(wf[84,338])
print(wf[84,339]) # this pixel is wrong!

Yes this is a vignetting issue, the vignetting by the segments is recomputed for each propagation (+gs) and the vignetting is a function of  the position of the segments (state) so you need to take into account the amplitude before and  after applying the state when you differentiate the wavefront, like so:
import ceo
import sys
import datetime
import os.path
import numpy as np
import matplotlib.pyplot as plt
plt.ion()

gmt = ceo.GMT_MX()

D = 25.5
gmt.M2_baffle = 3.5 # Circular diameter pupil mask obscuration
gmt.project_truss_onaxis = True

nPx = 512 # number of pixels across D
gs = ceo.Source("R+I",zenith=0.,azimuth=0.,rays_box_size=D, rays_box_sampling=nPx, rays_origin=[0.0,0.0,25])

gs>>(gmt,)

~gmt
+gs
amplitude = gs.wavefront.amplitude.host().ravel()
phase_ref = gs.wavefront.phase.host().ravel()

~gmt
state = gmt.state
state['M1']['Rxyz'][3,1] = 1e-6
gmt^=state
+gs

validpts = np.where(amplitude*gs.wavefront.amplitude.host().ravel())[0]
nphasevals = len(validpts)

temp = np.full(nPx**2, np.nan)
temp[validpts] = (gs.wavefront.phase.host().ravel() - phase_ref)[validpts]
plt.figure(1)
plt.clf()
wf = np.reshape(temp,(nPx,nPx))
plt.imshow(wf,interpolation='None', origin='lower')
plt.colorbar()
plt.show()

print(wf[80,337])
print(wf[80,338])
print(wf[80,339]) # this pixel is wrong!
print()
print(wf[84,337])
print(wf[84,338])
print(wf[84,339]) # this pixel is wrong!


Error occurred during the import.

Hello,
When the history folder does not exists, error occurred during the import.
`events.js:160
throw er; // Unhandled 'error' event
^
Error: SQLITE_CANTOPEN: unable to open database file
at Error (native)
`

I noticed this before as well, fixing ASAP!


test: unit testing fixes

More for #72

Move to vitest // Removed jest

:tada: This PR is included in version 2.0.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Add tests for coercion from blank values

Missing coverage for this type of coercions.

✅ No public API change.

✅ No public API change.


Serialization refactoring

Preverb, as a part of SearchResult class, had a serialization function before #295, where serialization of the rest of the whole class were implemented.
This PR unifies the them and let them happend together immediately before passing into a template.

Codecov Report

Merging #301 into master will decrease coverage by 0.1%.
The diff coverage is 70%.

@@            Coverage Diff             @@
##           master     #301      +/-   ##
==========================================
- Coverage      84%   83.89%   -0.11%
==========================================
  Files          56       56
  Lines        2151     2155       +4
==========================================
+ Hits         1807     1808       +1
- Misses        344      347       +3

Impacted Files
Coverage Δ

CreeDictionary/API/models.py
86.66% <70%> (-0.88%)
:arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3a57e21...50b79d4. Read the comment docs.


autoextract: recognize failure when MFF installation doesn't work?

No longer using autoextract, won't fix


Tokio 0.2

Hey, thanks for this! I might wait to merge it until the futures are on stable, does that sound acceptable to you?

I don't think there will be any major additions to this crate in the near future. Why wait then? Let's make an immediate (hopefully final) release for tokio 0.1 and unblock those who have already started to migrate to tokio 0.2. 1 2

I have removed the NonZero commit for now and will put it up as a separate pull request after this one.

Hey. It looks good. Is there a reason why the traits are still using IoFuture? Is async not supported in traits?

async fn is not supported in traits just yet. Nevertheless, I have removed IoFuture in favor of using async fn where possible and just typing out Pin<Box<...>> for trait methods.

Thanks. Do you want a release of this now or it can wait? It would be a nightly only release.


Fix realpath() based logic for windows compatiblity.

This dependency is totally breaking Magento 2.2.0 release on Windows. Tried to keep original logic as untouched as posible.

Could you please check whether #455 already fixes this issue? As I understand it, this PR is intended to address exactly the same problem.

#455 Fixes this. Closing PR.

@david-garcia-garcia Sweet, thanks for checking / confirming :-).


sway: Simplify screen sharing

This should make it easier to get started.
The xdg-desktop-portal backend for wlroots is required and one needs to
"make sure WAYLAND_DISPLAY and XDG_CURRENT_DESKTOP are imported into
D-Bus." 0

Motivation for this change
I've tested this with Chromium (chromium --enable-features=UseOzonePlatform --ozone-platform=wayland --disable-gpu-memory-buffer-video-frames) and it worked (with and without XWayland enabled).
Users need at least the following to make screen sharing work (that shouldn't be part of the Sway module):
xdg.portal.enable = true;
services.pipewire.enable = true;

Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Ensured that relevant documentation is up to date
[ ] Fits CONTRIBUTING.md.

I wonder this or newest pull req of portal make my screen sharing broke again, especially on obs-wayland overlay and firefox via home-manager?

This shouldn't break screen sharing, please open a new issue with more information.

This breaks screen sharing if the user already has extraPortals = with pkgs; [ xdg-desktop-portal-wlr ]; set.

@siraben why does screen sharing break if xdg-desktop-portal-wlr is twice in extraPortals?

Home Manager also starts a service for xdg-desktop-portal, since this is now added by default, both home-manager and nixos-rebuild fail to build the config. @ahdyt did you experience this as well?

The NixOS module for Sway doesn't start a service for xdg-desktop-portal by default (this option only has an effect with xdg.portal.enable).

both home-manager and nixos-rebuild fail to build the config.

Not sure what's happening here. AFAIK HM should be completely isolated from the NixOS config.
This probably requires further analysis and should also be a dedicated GH issue if it's really something that requires a change in Nixpkgs instead of the HM repo (might make sense to discuss it there first?).

I happened to have xdg.portal.enable = true (but extraPortals was blank). I installed xdg-desktop-portal via Home Manager already so was able to observe the change when upgrading the system config.

As discussed on Matrix, this is the error that appears
  UNIT                           LOAD      ACTIVE SUB    DESCRIPTION
● wlsunset.service               not-found failed failed wlsunset.service
● xdg-desktop-portal-wlr.service loaded    failed failed Portal service (wlroots implementation)

@siraben why does screen sharing break if xdg-desktop-portal-wlr is twice in extraPortals?

Not sure why but I can replicate it with
  xdg = {
    portal = {
      enable = true;
      extraPortals = with pkgs; [
        xdg-desktop-portal-wlr
        xdg-desktop-portal-gtk # optionally remove
      ];
      gtkUsePortal = true;
    };
  };

Both issues are resolved when xdg.portal.enable = true is removed.

Isn't that the actual issue then (enabling this in both the NixOS and Home Manager configurations)?

ln: failed to create symbolic link '/nix/store/lj3zw0xfqh4h51vwjrfkv1kvhij3hipk-user-units/xdg-desktop-portal-wlr.service': File exists

That also isn't ideal but I don't think this warrants changing the Sway module (not sure if there's a meta issue for this case is only an example/instance of the underlying problem).


selectNodeVersion.js revisions for Linux

(Looking at adding tests, just getting this out now for an early look)
selectNodeVersion.js is called by kuduscript during node deployments to select node and npm versions used during npm package restore. It contains a lot of logic that isn't relevant on Linux, and is fairly convoluted.
This change bifurcates the majority of the script based on platform, adding a Linux-specific branch with simpler/clearer logic, and fixing problems we're seeing on Linux due to different environment and inputs. It intends to keep Windows behavior completely unchanged.
It looks like github's diff view has a really hard time aligning the two versions; you may want to view in another app.

After sleeping on it, I will probably be cancelling https://github.com/projectkudu/KuduScript/pull/75 and updating this PR with a couple extra compensating changes, to help ensure continuity of as-is behavior on Windows.


Add a new Bar Style

I would like a horizantal bar to show a device status. The device state is the state value of the time series. I need to show it like this

The background color is set to black, and there is no need to display the Y axis, and the device status is represented by different colors or styles. Can you implement the base Bar control with different colors in the legend, and support the extension for me to achieve the latter two different styles of display.

Hi @enumer, I'm adding AddRectangle() to the next release, allowing you to add shapes wherever you wish on the plot
using ScottPlot;

Plot plt = new();
plt.Style.DarkMode();

Color[] colors = { Colors.Red, Colors.Green, Colors.Yellow, Colors.LightGray };

double x = 0;
for (int i = 0; i < 10; i++)
{
    double width = Random.Shared.Next(1, 5);
    x += width;
    double y = Random.Shared.Next(1, 3);

    CoordinateRect cr = new(x, x + width, y, y + 1);
    var rp = plt.Add.Rectangle(cr);
    rp.LineStyle.Width = 0;
    rp.FillStyle.Color = colors[Random.Shared.Next(colors.Length)];
}

plt.SavePng("test.png", 600, 300);


test: Cypress -Divider widget automation

Description
Adding cypress tests for divider widget as per this test plan: https://github.com/appsmithorg/TestSmith/issues/2480 and unskip git tests
Type of change

Please delete options that are not relevant.

Bug fix (non-breaking change which fixes an issue)
New feature (non-breaking change which adds functionality)
Breaking change (fix or feature that would cause existing functionality to not work as expected)
Chore (housekeeping or task changes that don't impact user perception)
This change requires a documentation update

How Has This Been Tested?
locally
Test Plan

Add Testsmith test cases links that relate to this PR

Issues raised during DP testing

Link issues raised during DP testing for better visiblity and tracking (copy link from comments dropped on this PR)

Checklist:
Dev activity

[ ] My code follows the style guidelines of this project
[ ] I have performed a self-review of my own code
[ ] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[ ] My changes generate no new warnings
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] New and existing unit tests pass locally with my changes
[ ] PR is being merged under a feature flag

QA activity:

[ ] Speedbreak features have been covered
[ ] Test plan covers all impacted features and areas of interest
[ ] Test plan has been peer reviewed by project stakeholders and other QA members
[ ] Manually tested functionality on DP
[ ] We had an implementation alignment call with stakeholders post QA Round 2
[ ] Cypress test cases have been added and approved by SDET/manual QA
[ ] Added Test Plan Approved label after Cypress tests were reviewed
[ ] Added Test Plan Approved label after JUnit tests were reviewed

/ok-to-test

/ci-test-limit

/ci-test-limit


Add claude optimized version

As a note, Scratchpad was built initially by Claude/Anthropic documentation. So it is built to work first with Claude always. Initially Opus, now a combo of models but always starting with Sonnet 3.5. That being said, if you have anything direct you’d want to see different, I have at least 50 versions of scratchpad made up since March, more than likely one that is aligned with your use case.


Add multipart stream/response iterator

Hi Guys,
This patch add support for multipart responses

This looks really cool! I don't think that this belongs in Guzzle's core though. What would you think about making a separate repo that people can use if they need multipart iteration?
Some feedback though:

Usage examples would help a lot.
Functions like current() and valid() should be idempotent so that they can be called multiple times in a row without causing a side-effect.
Not sure if it's coded this way now, but it would be nice if each part did not require loading the entire part into memory.

Hi @mtdowling,
I'm OK making it a separate repo,
but you guys already have a MultipartBody to create responses why not support reading it to ?

I updated the iterator behaviour
It reads each part as a stream
Assuming you have a multipart response like :
Usage example

curl -v http://<IP_ADDRESS>:8098/buckets/test/keys/doc -H "Accept: multipart/mixed"
* About to connect() to <IP_ADDRESS> port 8098 (#0)
*   Trying <IP_ADDRESS>... connected
* Connected to <IP_ADDRESS> (<IP_ADDRESS>) port 8098 (#0)
> GET /buckets/test/keys/doc HTTP/1.1
> User-Agent: curl/7.19.4 (universal-apple-darwin10.0) libcurl/7.19.4 OpenSSL/0.9.8l zlib/1.2.3
> Host: <IP_ADDRESS>:8098
> Accept: multipart/mixed
>
< HTTP/1.1 300 Multiple Choices
< X-Riak-Vclock: a85hYGDgyGDKBVIszMk55zKYEhnzWBlKIniO8kGF2TyvHYIKf0cIszUnMTBzHYVKbIhEUl+VK4spDFTPxhHzFyqhEoVQz7wkSAGLMGuz6FSocFIUijE3pt5HlsgCAA==
< Vary: Accept, Accept-Encoding
< Server: MochiWeb/1.1 WebMachine/1.9.0 (participate in the frantic)
< Date: Fri, 30 Sep 2011 15:24:35 GMT
< Content-Type: multipart/mixed; boundary=YinLMzyUR9feB17okMytgKsylvh
< Content-Length: 766
<

--YinLMzyUR9feB17okMytgKsylvh
Content-Type: application/x-www-form-urlencoded
Link: </buckets/test>; rel="up"
Etag: 16vic4eU9ny46o4KPiDz1f
Last-Modified: Wed, 10 Mar 2010 18:01:06 GMT

{"bar":"baz"}
--YinLMzyUR9feB17okMytgKsylvh
Content-Type: application/json
Link: </buckets/test>; rel="up"
Etag: 4v5xOg4bVwUYZdMkqf0d6I
Last-Modified: Wed, 10 Mar 2010 18:00:04 GMT

{"bar":"baz"}
--YinLMzyUR9feB17okMytgKsylvh
Content-Type: application/json
Link: </buckets/test>; rel="up"
Etag: 6nr5tDTmhxnwuAFJDd2s6G
Last-Modified: Wed, 10 Mar 2010 17:58:08 GMT

{"bar":"baz"}
--YinLMzyUR9feB17okMytgKsylvh
Content-Type: application/json
Link: </buckets/test>; rel="up"
Etag: 6zRSZFUJlHXZ15o9CG0BYl
Last-Modified: Wed, 10 Mar 2010 17:55:03 GMT

{"foo":"bar"}
--YinLMzyUR9feB17okMytgKsylvh--
* Connection #0 to host <IP_ADDRESS> left intact
* Closing connection #0

Guzzle :
$client  = new \GuzzleHttp\Client();
$request = $client->createRequest('GET', 'http://<IP_ADDRESS>:8098/buckets/test/keys/doc');

$request->setHeader('Accept', 'multipart/mixed');

$response = $client->send($request);
$iterator = new \GuzzleHttp\Message\MultipartResponseIterator($response);
$list[]   = [];

/** @var $item \GuzzleHttp\Message\Response */
foreach ($iterator as $item) {
    $list[] = $item->json();
}

var_dump($list);
/*
array(4) {
  [0] =>
  array(1) {
    'bar' =>
    string(3) "baz"
  }
  [1] =>
  array(1) {
    'bar' =>
    string(3) "baz"
  }
  [2] =>
  array(1) {
    'bar' =>
    string(3) "baz"
  }
  [3] =>
  array(1) {
    'foo' =>
    string(3) "bar"
  }
}
*/

It looks cool. I'd be happy to accept a pull request that links the Guzzle docs to your project.
The reason I don't think this belongs in the Guzzle repo is that Guzzle only supports building multipart/form-data request bodies so that it can support sending POST requests. Sending POST requests is an extremely common requirement of HTTP clients. Parsing mutlpart responses is not as common of a usecase, so I think it doesn't need to be in the main repo.


@shopify/react-testing

This PR introduces an alternative testing library to Enzyme. We've had numerous troubles with Enzyme in the past that made me decide to dive into this:

It has not always been very quick to pick up new React features, meaning we either have to do hacks to test them, avoid testing them, or wait to upgrade React
It has a lot of features we don't like and try to actively dissuade people from, like state/ setState/ other things that deal with parts that we consider to be implementation details within a React component
It does not support some features we need/ we have had trouble submitting some features upstream. Two notable examples are trigger and automatic mount tracking/ global "unmount all"
Its API is not well structured to promote type safety

The main alternative to Enzyme is https://github.com/kentcdodds/react-testing-library. This library is better for keeping up with React's many changes, but the tests it promotes are completely different from our own style (very much driven by the DOM and not really caring about component boundaries).
The README in this PR details the library fairly well. It is roughly similar to Enzyme, but has built-in support for mount tracking/ trigger, better support for strict typing, and a minimal API that only exposes the things we actively use a lot of. I rewrote one set of tests to show off some parts of the API.
In reviewing, aside from the obvious "do we need this" feedback (that I'd love to hear!), there's one big API decision I'd like some thoughts on: returning arrays from the "findAll" style methods, and returning null from the "findOne" style methods. Doing this simplifies the library a great deal, but does mean that non-null assertions are more frequently needed. Personally, I think that's appropriate, since there is no typing guarantee we can give that any "find" operation will return anything.

If people are happy with this, I also have a few matchers I'd like to add, then I consider this to be mostly feature-complete

I also wonder if we're going to be bit by not having an equivalent to simulate, I know we almost always use trigger but we might want to run this by the Polaris folks to see if they would be hurt by it.

We are going to merge this for now, try it out for a bit, and see if we then want to make any adjustments.


Get the document resolution (DPI --> pixel/inch)

Is it possible to get the document resolution.
I think this is an important feature since fonts size (in PT unit) should be computed from resolution.

Hey @joliejuke-orga.
The root node of the document contains the Height and Width of the document with which you can calculate the resolution.
As for DPI, I have not been able to find anything about it in the official doc. So i think its safe to assume it is not stored in the file itself.
I did however find that at 0x0435 they store display data which may contain info about it.
I have not tested this yet tho as it is something i don't have time for (barely get time to answer these issues these days :( )
Regards Duck

I've run into the same issue. Official doc mentions resolution info being on 0x03ED. I created #132 pull request to extract this information following example of psd.rb.


Allow calling togglePickerColorMode from outside of the library. Fix …

…typo.

In implementing the grayscale, I found that I need to also switch the mode programmatically. Was a quick fix.

Probably a good call to make the function outside accessible. LGMT 👍


fix: Check the name without a number at the beginning when creating a new dialog

Description

Task Item
closes #4246

Screenshots

Coverage increased (+0.002%) to 55.229% when pulling 7544bb9c1ce921259c3ba43ca40b8ba4cdcf9e31 on lei9444:dialogname into 819481b04ac6b34b92b03058fd7d4aef63a8d616 on microsoft:main.


Make connection interval configurable

As discussed in https://github.com/01org/corelibs-arduino101/issues/95.
cc/ @soundanalogous

Added added in https://github.com/sandeepmistry/arduino-BLEPeripheral/commit/ae5148ca2f9f9fec281f17ab49922550eba353a1.

Thanks for adding this! One suggestion however is to document that the min and max values passed to setConnectionInterval are the desired time values in milliseconds / 1.25 so if you want to set min as 7.5ms, you need to pass a value of 6 as the minInterval value.

@soundanalogous good suggestion!
I've added in f8f319d05dbe4a7411112fa8a0bb39e6aeced964 and 9149a50005abc902c76daf9b055218346e77a18a.


Remove Preview from component title and fix description in VS installer

Contributes to #1699
cc: @danegsta @timheuer @dbreshears
This will need to be backported to release/8.0 cc: @danmoseley
Microsoft Reviewers: Open in CodeFlow

Yup good to merge into 8.0

/backport to release/8.0


use the inherit and reference the variable directly

This is required on ubuntu 16.04

This module is built up in such a way that you always have to include the apt class in order to be able to use any of its subcomponents.
As per the README

Note: The main apt class is required by all other classes, types, and defined types in this module. You must declare it whenever you use the module.

The inheritance is something we explicitly want to avoid, it causes more issues than it solves. Please include the apt base class when you intend to use the defined types of this module and the rest should work. If that's not the case feel free to reopen this with a way to reproduce the issue.


XPR Account
achuyakub
Feedback (optional)
No response

hey @achu94,
I added you to the reward contract which makes you eligible to claim the reward with your homework task as soon as I "lock" the participants by enabling the claiming period by calling "enableclaim" action on the contract :-)
I will still wait a little bit before I lock the participants to give others the chance to join. I will let you know when this is done.
please use following link to join our Telegram group for further discussion. feel free to forward to other workshop participants, too.

https://t.me/+jdNBWSdRToc2YTJi

you have 30 days to complete the task and claim the reward. don't forget to create another account via CLI and call "setcontract" on the sdcworkshop account here:

https://explorer.xprnetwork.org/account/sdcworkshop?loadContract=true&tab=Actions&limit=100&table=developers&action=setcontract

Marco


liquibase generates boolean columns only in ibm db2 versions with fixpack version >= 1

Search first

[X] I searched and no similar issues were found

Description
IBM DB2 supports BOOLEAN type columns as of version <IP_ADDRESS>. We are using IBM DB2 <IP_ADDRESS>, Liquibase continues to generate SMALLINT for the columns of type BOOLEAN. In IBM DB2 with a fix pack >= 1, the correct data type is generated by Liquibase.
<changeSet context="create" author="xxx" id="create-table_with_boolean">
	<createTable tableName="TEST_TABLE">
		<column name="ID" type="VARCHAR(36)">
			<constraints nullable="false" primaryKey="true"
				primaryKeyName="TEST_TABLEPK"></constraints>
		</column>
		<column name="NUMBER_INT" type="INT" />
		<column name="NUMBER_SMALLINT" type="SMALLINT" />
		<column name="FLAG" type="BOOLEAN" />
	</createTable>
</changeSet>

Steps To Reproduce
Use the changeset above with two installations of IBM DB2. One of the Installations should have Fixpack 0.
Expected/Desired Behavior
For all versions of IBM DB2 after <IP_ADDRESS>, Liquibase also generates the corresponding database columns of type BOOLEAN for columns that are defined as BOOLEAN in the changesets.
Liquibase Version
4.20.0
Database Vendor & Version
IBM DB2 LUW <IP_ADDRESS>
Liquibase Integration
spring boot
Liquibase Extensions
No response
OS and/or Infrastructure Type/Provider
ubuntu, windows 10
Additional Context
No response
Are you willing to submit a PR?

[X] I'm willing to submit a PR (Thank you!)

The change should by done in liquibase.database.core.DB2Database, rows 38, 39
return getDatabaseMajorVersion() > 11
  || getDatabaseMajorVersion() == 11 && ( getDatabaseMinorVersion() == 1 && fixPack.intValue() >= 1 || getDatabaseMinorVersion() > 1 );
By the way, now it is not possible to override DB2Database (without overriding StandardLockService as well), because in liquibase.lockservice.StandardLockService, row 162, the check database.getClass().isAssignableFrom(DB2Database.class)  should be done like DB2Database.class.isAssignableFrom( database.getClass() ).

@haltenwe - Would you be willing to submit your fix as a PR? If you do so, we'll schedule it for review and integration in the next sprint.


Kaleido subprocess failed on Ubuntu 20.04.2 LTS x86_64

In my python dash application I tried to export figure image fig_img = figure.to_image(format="png", engine="kaleido") and then post the image to s3. But, there was an error with kaleido on my Ubuntu 20.04.2 LTS x86_64 server as the following:
response = self._perform_transform(
  File "/home/ubuntu/.virtualenvs/py39cv45/lib/python3.9/site-packages/kaleido/scopes/base.py", line 293, in _perform_transform
    self._ensure_kaleido()
  File "/home/ubuntu/.virtualenvs/py39cv45/lib/python3.9/site-packages/kaleido/scopes/base.py", line 198, in _ensure_kaleido
    raise ValueError(message)
ValueError: Failed to start Kaleido subprocess. Error stream:

/home/ubuntu/.virtualenvs/py39cv45/lib/python3.9/site-packages/kaleido/executable/kaleido: line 2: dirname: command not found
/home/ubuntu/.virtualenvs/py39cv45/lib/python3.9/site-packages/kaleido/executable/kaleido: line 10: ./bin/kaleido: No such file or directory

On my Ubuntu server, I installed kaleido version 3 and I'm using python 3.9. Unlike Ubuntu, it worked just fine on my macOS as a development machine. Could anyone help point out what I should configure to make it work?

Hi @meassinal, thanks for the report.  From the error message, it looks like there might be an issue with how the PATH environment variable is configured.  dirname is a built-in command that's usually located somewhere like /usr/bin/dirname, and the /usr/bin directory is expect to be listed in the PATH environment variable.
This can happen if there is a config file somewhere that accidentally overwrites the PATH, instead of adding to it.  For example, doing export PATH=/my/dir instead of export PATH=$PATH:/my/dir.
From your python script, you can run the following command to print out all of the directories that are on your path:
import os
print(os.environ["PATH"].replace(":", "\n"))

Also, kaleido 0.0.3 is a pretty old version at this point. Are you able to update? (current latest version of 0.2.1).

Hi @jonmmease, I am so grateful for your response. Following your points, I could figure out what might have caused the problem. In my supervisor config file, I did have environment=PATH=environment=PATH=/home/ubuntu/.virtualenvs/py39cv45/bin/python3.9 . But, after I tried updating to environment=PATH=$PATH:/python3.9 it still shows the same issue.
I've already updated my kaleido to current latest version of 0.2.1. Could you help to point out the issue?

Hi @meassinal,
Here are a couple of things that might be relevant.

https://serverfault.com/questions/331027/supervisord-how-to-append-to-path
https://github.com/Supervisor/supervisor/blob/master/supervisor/skel/sample.conf

I'm not very familiar with supervisord, but it looks like the syntax for referencing the existing PATH environment variable is not the same as it is for Bash.
Maybe try something like this
environment=PATH="/other/path/:%(ENV_PATH)s"

Also, just to double check, have you confirmed that you do have a dirname executable in /usr/bin?

Hi @jonmmease,
I've tried environment=PATH="/other/path/:%(ENV_PATH)s" for supervisor config yet still the error remains. Fortunately, however, I happened to modify kaleido bash script by using full path of dirname /usr/bin/dirname and then it worked 😄
Here is modified version of kaleido bash script on my ubuntu 20.04.2 LTS x86_64 server which lies in the path: /home/ubuntu/.virtualenvs/py39cv45/lib/python3.9/site-packages/kaleido/executable/kaleido
#!/bin/bash
DIR="$( cd "$( /usr/bin/dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"

export LD_LIBRARY_PATH=$DIR/lib:$LD_LIBRARY_PATH
export FONTCONFIG_PATH=$DIR/etc/fonts
export XDG_DATA_HOME=$DIR/xdg
unset LD_PRELOAD

cd $DIR
./bin/kaleido $@

I'd like to thank you so much for relevant key points to the error that without them I couldn't figure it out. I really appreciate your effort 🙏

Thanks for the update @meassinal, though it is still a bit troubling.
As one last experiment, could you try adding an echo $PATH to the Kaleido script to see what is on the PATH by the time the script runs?  I expect this would be added to a supervisord log file.
I'm wondering if we should consider searching for dirname in some common directories if it's not on the path :thinking:

Hi @jonmmease ,
The last experiment turned out that the path in supervisor process contained only my python path environment like so /home/ubuntu/.virtualenvs/py39cv45/bin/python3.9.
Here how I produced the result:
#!/bin/bash

echo "$PATH" > "/tmp/test_path.txt"

DIR="$( cd "$( /usr/bin/dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"

export LD_LIBRARY_PATH=$DIR/lib:$LD_LIBRARY_PATH
export FONTCONFIG_PATH=$DIR/etc/fonts
export XDG_DATA_HOME=$DIR/xdg
unset LD_PRELOAD

cd $DIR
./bin/kaleido $@

and when cat /tmp/test_path.txt the output is /home/ubuntu/.virtualenvs/py39cv45/bin/python3.9  so that it's the reason dirname could not be found via system path.
Probably, in some special cases you should use full executable path of /usr/bin/dirname.
Cheers!

Hi @jonmmease , The last experiment turned out that the path in supervisor process contained only my python path environment like so /home/ubuntu/.virtualenvs/py39cv45/bin/python3.9.
Here how I produced the result:
#!/bin/bash

echo "$PATH" > "/tmp/test_path.txt"

DIR="$( cd "$( /usr/bin/dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"

export LD_LIBRARY_PATH=$DIR/lib:$LD_LIBRARY_PATH
export FONTCONFIG_PATH=$DIR/etc/fonts
export XDG_DATA_HOME=$DIR/xdg
unset LD_PRELOAD

cd $DIR
./bin/kaleido $@

and when cat /tmp/test_path.txt the output is /home/ubuntu/.virtualenvs/py39cv45/bin/python3.9 so that it's the reason dirname could not be found via system path.
Probably, in some special cases you should use full executable path of /usr/bin/dirname.
Cheers!

Were you able to find a more elegant solution for this instead of replacing the line in the file?


Update create-a-dynamodb-table-in-sst.md

there is no time.ts file to remove

will merge to other PR