Skip to content

Commit f3595dd

Browse files
committed
Moves the links to the MLLS repository
1 parent 6dd95e3 commit f3595dd

File tree

5 files changed

+42
-16
lines changed

5 files changed

+42
-16
lines changed

docs/protein-optimization/contributing/a_new_problem.md

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Contributing a new problem to the repository
1+
# Adding a new problem to the repository
22

33
This tutorial covers how problems are structured in the repository, and what it takes to add a new one.
44

@@ -9,16 +9,18 @@ If you take a look at the source code of `poli`, you will find a folder called `
99
```bash
1010
poli/objective_repository
1111
├── problem_name # Has the name of the registered problem (exactly)
12+
│   ├── __init__.py # Necessary, else it doesn't get included in the pip install.
1213
│   ├── environment.yml # The env. where ./register.py and the problem will run
1314
│   └── register.py # Definition and registration of the problem
1415
```
1516

1617
You can also have as many other files as you want. Think of the folder `.../problem_name` as a small project as of itself: you can have Python dependencies that will get appended to the path at runtime.
1718

18-
**For example:**, let's take a look at the problem folder of `super_mario_bros`
19+
**For example:** let's take a look at the problem folder of `super_mario_bros`
1920

2021
```bash
2122
├── super_mario_bros
23+
│   ├── __init__.py
2224
│   ├── environment.yml
2325
│   ├── register.py
2426
│   ├── example.pt # < --
@@ -47,6 +49,11 @@ from poli.core.abstract_black_box import AbstractBlackBox
4749
from poli.core.abstract_problem_factory import AbstractProblemFactory
4850
from poli.core.problem_setup_information import ProblemSetupInformation
4951

52+
# Files that are in the same folder as
53+
# register will get added to the
54+
# PYTHONPATH at runtime.
55+
from your_local_dependency import ...
56+
5057

5158
class YourBlackBox(AbstractBlackBox):
5259
def __init__(self, L: int = np.inf):
@@ -75,7 +82,12 @@ class YourProblemFactory(AbstractProblemFactory):
7582
alphabet=alphabet,
7683
)
7784

78-
def create(self, seed: int = 0, keyword_1 = ..., keyword_2 = ...) -> Tuple[AbstractBlackBox, np.ndarray, np.ndarray]:
85+
def create(
86+
self,
87+
seed: int = 0,
88+
your_keyword_1: str = ...,
89+
your_keyword_2: str = ...,
90+
) -> Tuple[AbstractBlackBox, np.ndarray, np.ndarray]:
7991
# Manipulate keywords you might need at creation time...
8092
...
8193

@@ -110,7 +122,7 @@ if __name__ == "__main__":
110122
That is, **the script creates and registers** your problem factory.
111123

112124
:::{warning}
113-
It is important that name of your problem should be the name of the folder it's contained, exactly. (We advice using `camel_case`).
125+
It is important that name of your problem should be the name of the folder it's contained, **exactly**. (We advice using `camel_case`).
114126
:::
115127

116128
## A generic `environment.yml`
@@ -126,7 +138,7 @@ dependencies:
126138
- pip
127139
- pip:
128140
- numpy
129-
- "git+https://github.com/miguelgondu/poli.git"
141+
- "git+https://github.com/MachineLearningLifeScience/poli.git"
130142
- YOUR OTHER DEPENDENCIES
131143
```
132144
@@ -150,7 +162,7 @@ dependencies:
150162
- pip:
151163
- numpy
152164
- click
153-
- "git+https://github.com/miguelgondu/poli.git"
165+
- "git+https://github.com/MachineLearningLifeScience/poli.git"
154166
155167
```
156168

@@ -189,8 +201,10 @@ from poli import objective_factory
189201
problem_info, f, x0, y0, _ = objective_factory.create(
190202
name="your_problem",
191203
...,
192-
keyword_1=..., # <-- Keywords you (maybe) needed
193-
keyword_2=... # <-- at your_factory.create(...)
204+
your_keyword_1=..., # <-- Keywords you (maybe) needed
205+
your_keyword_2=... # <-- at your_factory.create(...)
206+
# For now, only string kwargs are
207+
# supported.
194208
)
195209
```
196210

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
# Contributing a new black box optimization algorithm
1+
# Adding a new black box optimization algorithm
22

3-
[TODO: write] For now, check [the chapter on creating solvers](../using_poli/the_basics/defining_a_problem_solver.md).
3+
[TODO: write] For now, check [the chapter on creating solvers](../using_poli/the_basics/defining_a_problem_solver.md).

docs/protein-optimization/getting_started/getting_started.md

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ If you are not interested in debugging, you can simply run
3939

4040
```bash
4141
# in the poli-base env
42-
pip install git+https://github.com/miguelgondu/poli.git
42+
pip install git+https://github.com/MachineLearningLifeScience/poli.git
4343
```
4444

4545
:::
@@ -50,7 +50,7 @@ If you are interested in debugging locally, clone and install as follows:
5050

5151
```bash
5252
# in the `poli-base` env.
53-
$ git clone [email protected]:miguelgondu/poli.git
53+
$ git clone [email protected]:MachineLearningLifeScience/poli.git
5454
$ cd ./poli
5555
$ pip install -e .
5656
```
@@ -59,6 +59,12 @@ $ pip install -e .
5959

6060
::::
6161

62+
:::{warning}
63+
64+
`poli` works by creating shell scripts inside your home folder, under `./.poli_objectives`. Make sure you're okay with this.
65+
66+
:::
67+
6268
### Testing your installation
6369

6470
To make sure everything went well, you can test your `poli` installation by running
@@ -70,9 +76,9 @@ $ python -c "from poli.core.registry import get_problems ; print(get_problems())
7076

7177
If the installation isn't fresh/the only one in your system, you might actually get some registered problems.
7278

73-
## Running `poli` in Colab
79+
## Running `poli` on Colab
7480

75-
With a little effort, you can run `poli` in Colab. [Check this example](https://colab.research.google.com/drive/1-IISCebWYfu0QhuCJ11wOag8aKOiPtls).
81+
With a little effort, you can run `poli` on Colab. [Check this example](https://colab.research.google.com/drive/1-IISCebWYfu0QhuCJ11wOag8aKOiPtls).
7682

7783

7884
## Your first `poli` script
@@ -100,6 +106,12 @@ for _ in range(5):
100106

101107
If we run this script, `poli` will ask us to confirm that we want to register/install `"white_noise"` as an objective function (you can deactivate this confirmation step by passing the flag `force_register=True` to `.create`). Afterwards, it will print 5 evaluations of the objective function on the same input.
102108

109+
:::{warning}
110+
111+
In the registration process, `poli` creates a `conda` environment, and **executes a shell script**. Be wary of objective functions you find in the wild.
112+
113+
:::
114+
103115
## Conclusion
104116

105117
This tutorial showed you how to install `poli`, and register `white_noise`, which is available inside `poli` itself.

docs/protein-optimization/using_poli/the_basics/registering_an_objective_function.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ dependencies:
126126
- pip
127127
- pip:
128128
- numpy
129-
- "git+https://github.com/miguelgondu/poli.git"
129+
- "git+https://github.com/MachineLearningLifeScience/poli.git"
130130
```
131131
132132
:::{admonition} Why conda? Why an entire environment?

readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ This repository contains documentation on how protein optimization is currently
88
The folder `./docs/protein-optimization` is a [Jupyter Book](https://jupyterbook.org/en/stable/intro.html). To build it, create a new environment (`python>=3.9`) and install the requirements:
99

1010
```bash
11-
pip install jupyter-book biopython pandas git+https://github.com/miguelgondu/poli.git
11+
pip install jupyter-book biopython pandas git+https://github.com/MachineLearningLifeScience/poli.git
1212
```
1313

1414
## Installing poli baselines

0 commit comments

Comments
 (0)