Skip to content

Commit bfab7bd

Browse files
committed
[experiment](docs) Update README
1 parent 6a4f19e commit bfab7bd

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

pydentification/experiment/README.md

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,28 @@ integral part of the library, so they need additional code defining the experime
77

88
To use the entrypoints and utils provided here, `RuntimeContext` needs to be implemented, which is used to parametrize
99
the experiment. Interface is given by state-less class, so it can be defined as single namespace, it needs to be passed
10-
to the entrypoint function.
10+
to the entrypoint function.
1111

12-
**Note**: `run.py` and `sweep.py` do define `main` functions, but never execute them.
12+
To run experiment (assume not using sweep for now), following code needs to be implemented. This additionally allows
13+
to use `click` library to pass the config files as options.
1314

14-
### Main
15+
```python
16+
import click
1517

16-
To run experiment (assume not using sweep for now), following code needs to be implemented.
18+
from pydentification.experiment.entrypoints import run
1719

18-
```python
19-
from pydentification.experiment.run import main
20+
from src import runtime # assume this is project specific code
2021

21-
from src import context # assume this is project specific code
2222

23+
@click.command()
24+
@click.option("--data", type=click.Path(exists=True), required=True)
25+
@click.option("--experiment", type=click.Path(exists=True), required=True)
26+
def main(data, experiment):
27+
run(data=data, experiment=experiment, runtime=runtime)
2328

2429

2530
if __name__ == "__main__":
26-
main(context)
31+
main()
2732
```
2833

2934
To run simply execute the script with flags for config passing.

0 commit comments

Comments
 (0)