Skip to content

Commit c063a72

Browse files
authored
Merge branch 'main' into main
2 parents ab9041d + a4160a2 commit c063a72

3 files changed

Lines changed: 18 additions & 3 deletions

File tree

s1_development_environment/deep_learning_software.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ your system.
9595

9696
Here are some general installation commands for Pytorch:
9797

98-
9998
=== "Using pip"
10099

101100
For `pip` install you can basically follow the instructions on the Pytorch homepage. Here are some common
@@ -153,6 +152,11 @@ Here are some general installation commands for Pytorch:
153152
[Exercise files](https://github.com/SkafteNicki/dtu_mlops/tree/main/s1_development_environment/exercise_files){ .md-button }
154153
<!-- markdownlint-restore -->
155154

155+
!!! tip "Notebooks and `uv`
156+
157+
If you are using `uv` as your package manager, you may need to restart the Jupyter Notebook kernel after installing
158+
new packages to ensure that the newly installed packages are recognized within the notebook environment.
159+
156160
1. Start a Jupyter Notebook session in your terminal (assuming you are at the root of the course material).
157161
Alternatively, you should be able to open the notebooks directly in your code editor. For VS Code users you can read
158162
more about how to work with Jupyter Notebooks in VS code

s1_development_environment/package_manager.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,19 @@ to make it work.
415415
uv python pin 3.13
416416
```
417417

418-
8. (Optional) `uv` also supports the notion of *tools* which are external command line tools that you may use in
418+
8. Assume you have a friend wonking on the same project as you and they are using `pip` together with good old
419+
`requirements.txt` files. How do you create a `requirements.txt` file from your `uv` project?
420+
421+
??? success "Solution"
422+
423+
Relevant documentation can be found
424+
[here](https://docs.astral.sh/uv/concepts/projects/sync/#exporting-the-lockfile).
425+
426+
```bash
427+
uv export --format requirements.txt
428+
```
429+
430+
9. (Optional) `uv` also supports the notion of *tools* which are external command line tools that you may use in
419431
multiple projects. Examples of such tools are `black`, `ruff`, `pytest` and so on (all which you will encounter
420432
later in the course). These tools can be installed globally on your system by using the `uvx` (or `uv tool`):
421433
command:

s2_organisation_and_version_control/code_structure.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,6 @@ your head around where files are located.
340340
uvx invoke
341341
# then you can execute the tasks
342342
uvx invoke preprocess-data # runs the data.py file
343-
uvx invoke requirements # installs all requirements in the requirements.txt file
344343
uvx invoke train # runs the train.py file
345344
# or get a list of all tasks
346345
uvx invoke --list

0 commit comments

Comments
 (0)