Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,12 @@ repos:
rev: 22.8.0
hooks:
- id: black
language_version: python3.8
- repo: https://github.com/psf/black
rev: 22.1.0
hooks:
- id: black-jupyter
language_version: python3

# import 並び替え
- repo: https://github.com/pycqa/isort
rev: 5.10.1
Expand Down
4 changes: 3 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"python.linting.flake8Enabled": true,
"python.linting.pylintEnabled": false,
"python.linting.enabled": true
"python.linting.enabled": true,
"python.defaultInterpreterPath": "./.venv"
}

4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
env-create:
conda env create --prefix=.venv --file=environments/environment.yml
env-update:
conda env update --prefix=.venv --file=environments/environment.yml
26 changes: 26 additions & 0 deletions docs/01_create_environemnt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# create environment

```
make env-create
```

```make env-create``` command is an alias of command below defined in Makefile.

```
conda env create --prefix ./.env --file environment.yml
```

If you place this repository on WSL2 /mnt/* or AzureML Compute Instance working directory, we recommend to change ```--prefix ./.env``` to ```--prefix ~/azureml-mlops-env``` because of storage latency.

Affected:
- .vscode/setting.json ```python.defaultInterpreterPath```
- Makefile

# update environment

1. Add new package name and version to environment.yml.
1. ```make env-update```

```make env-update``` command is alias of command below defined in Makefile.

```conda env update --prefix ./.env --file environment.yml```
20 changes: 20 additions & 0 deletions environments/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: azureml-mlops-env
channels:
- defaults
- conda-forge
dependencies:
- python=3.10.6
- pip
- flake8=5.0.4
- isort=5.10.1
- black=22.8.0
- notebook
- ipykernel
- numpy=1.23.1
- matplotlib=3.5.2
- tqdm=4.64.0
- mlflow=1.29.0
- pip:
- azureml-core==1.43.0
- azureml-mlflow==1.43.0.post1
- black_nbconvert==0.4.0
6 changes: 3 additions & 3 deletions notebooks/train-prototyping.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3.8.13 ('mlops-train')",
"display_name": "Python 3.10.6 (conda)",
"language": "python",
"name": "python3"
},
Expand All @@ -317,12 +317,12 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.13"
"version": "3.10.6"
},
"orig_nbformat": 4,
"vscode": {
"interpreter": {
"hash": "74419d3d9274bcbfe6ecb9acd0596b867bc1ac63effdfbb8a6e0b958ebbd5c34"
"hash": "38e473d28400b2903a173eeae82f0fe034393fd50eb0c5d12497f83fc604afcc"
}
}
},
Expand Down