Replies: 2 comments 5 replies
-
Thanks for your suggestions. Regarding having a "dedicated environment with GPU-enabled compiler", I'm not sure what do you mean. A python virtual environment? A docker image for an OS with everything pre-installed? And by "GPU-enabled" you mean wrt Pytorch, jax, both? Note that soon we are also adding PennyLane and Quantum TF support, so as you can see there are so many possibilities, so creating pre-made environments for everything is not that simple. Regarding the downloadable checkpoints, I admit it's not clear to me what you are suggesting. Could you provide more information? Regarding the "error suggestion" point, do you have any specific examples in mind that would help us understand better the issue? |
Beta Was this translation helpful? Give feedback.
-
Hi!
you can simply do
```python
model = PytorchModel.from_diagrams(diagrams)
model.initialise_weights()
model.to(torch.device(f'cuda:{device_id}'))
```
or specify the device id in the trainer, using the `device` argument.
|
Beta Was this translation helpful? Give feedback.
-
Motivation:
Given none of the currently existing platforms support the Lambeq packages, it would nice if there was a dedicated environment with GPU-enabled compiler to allow the user(s) to train models using TKET and have WSL interpreter for running WebParser. This environment would have the imports pre-installed by default and allow for .txt or .csv file imports for the dataset.
Downloadable Checkpoints:
This manner user(s) can train the models based on preference with high speed, and eliminate any variability given different IDEs and/or interpreters which may potentially disrupt the model. This would allow users to outsource the training process to a GPU-based environment and simply download the model.lt checkpoint to use locally. Given the necessity of a WSL interpreter for running WebParser, the user could also download .pkl format of Webparsed diagrams to be used on locally as an additional feature as well.
Error Suggestion :
There could also be a suggestion system based on errors, like TypeError : Ty('p') which essentially indicates the need for an AtomicType.PREPOSITIONAL_PHRASE, or the trainer operand issue which indicates an issue with some diagrams having different number of output wires and provide suggestions for changing the dataset accordingly.
Proposed Feature Summary:
Given how each online environment requires users to pip install the libraries and currently this is the issue with platforms such as Colab and Deepnote, the environment would have the Lambeq and DiscoPY packages pre-installed, and run on Linux OS with WSL being the default interpreter. Since TKET is currently very slow for intermediate scale models, GPU feature would be incredibly useful. And lastly having a function to generate downloadable files for the model.lt and Webparser diagrams.
Beta Was this translation helpful? Give feedback.
All reactions