Closed andakai closed 3 months ago
You can follow the instructions here to install from PyPI with pip
: https://datadreamer.dev/docs/latest/#
And there are some examples of how the package can be used on the Quick Tour page: https://datadreamer.dev/docs/latest/pages/get_started/quick_tour/index.html
Then you can use the code from the test case as an example of how to modify some of the Quick Tour examples to do what you need.
Sorry that I didn't clarify my need.
I want to modify some codes in the src
, and then install the new version as a wheel
, so that I can use
from datadreamer.llms import VLLM, ParallelLLM
from datadreamer import DataDreamer
in other directories, not only in the /src/tests
.
You don't need to modify the package, it already comes with these built in:
from datadreamer.llms import VLLM, ParallelLLM
from datadreamer import DataDreamer
See the VLLM & ParallelLLM class in the documentation: https://datadreamer.dev/docs/latest/datadreamer.llms.html#datadreamer.llms.VLLM https://datadreamer.dev/docs/latest/datadreamer.llms.html#datadreamer.llms.ParallelLLM
Sorry again for the my unclear expression and I am new to programming.
I want to modify some codes in datadreamer.llms.VLLM
to satisfy my personal need, and I want to use the modified codes in other directories.
As in vllm project, I can use pip install -e .
to install from source. I wonder whether there is similar way for datadreamer.
Oh I see, we don't have great support for editing & locally installing like that unfortunately. Mainly expecting people to install via PyPI. There are two options you can try:
1) Install from PyPI and then edit the files in the install location: For example, first install via pip install datadreamer.dev
and then you can do this to find where to edit the files:
2) Sub-class and extend the classes you wish to edit: If your edits / changes can be handled by sub-classing and you're comfortable doing that, you could also just subclass whatever class you need to edit like VLLM
and override the methods.
Thanks! These two methods exactly solve my problem. Thanks for your patient answers and I learn a lot.
I have found that I can change the
src
code and test it intests
.How can I install from the source code and use in other directories like: