Skip to content

Commit

Permalink
rename: nSamples to n_samples
Browse files Browse the repository at this point in the history
  • Loading branch information
MalteEbner committed Aug 25, 2022
1 parent a14e987 commit 707eb17
Show file tree
Hide file tree
Showing 11 changed files with 28 additions and 28 deletions.
Expand Up @@ -75,7 +75,7 @@
"pretagging_debug": False,
},
selection_config={
"nSamples": 100,
"n_samples": 100,
"strategies": [
{
"input": {
Expand Down
Expand Up @@ -77,7 +77,7 @@
'pretagging_debug': False,
},
selection_config={
"nSamples": 100,
"n_samples": 100,
"strategies": [
{
"input": {
Expand Down
Expand Up @@ -78,7 +78,7 @@
},
},
selection_config={
"nSamples": 100,
"n_samples": 100,
"strategies": [
{
"input": {
Expand Down
Expand Up @@ -80,7 +80,7 @@
}
},
selection_config={
"nSamples": 100,
"n_samples": 100,
"strategies": [
{
"input": {
Expand Down
Expand Up @@ -76,7 +76,7 @@
'pretagging_debug': True, # we also want debugging images in the report
},
selection_config={
"nSamples": 100,
"n_samples": 100,
"strategies": [
{
"input": {
Expand Down
10 changes: 5 additions & 5 deletions docs/source/docker/examples/academic_datasets.rst
Expand Up @@ -45,8 +45,8 @@ bucket under `s3://dataset/imagenet/`. Start by creating a dataset and configuri
Next, we schedule a job which extracts 500000 frames with the default Coreset strategy which
selects a diverse set of frames:
Next, we schedule a job which extracts 500000 images with the CORESET strategy which
selects a visually diverse set of images:


.. code-block:: python
Expand All @@ -62,7 +62,7 @@ selects a diverse set of frames:
"pretagging_debug": False
},
selection_config = {
"nSamples": 500000,
"n_samples": 500000,
"strategies": [
{
"input": {
Expand Down Expand Up @@ -145,7 +145,7 @@ The following command schedules a job to select a subset from Cityscapes:
"pretagging_debug": False
},
selection_config = {
"nSamples": 10_000, # maket this number high (upper limit)
"n_samples": 10_000, # maket this number high (upper limit)
"strategies": [
{
"input": {
Expand Down Expand Up @@ -193,7 +193,7 @@ the new images.
"pretagging_debug": False,
},
selection_config = {
"nSamples": 10_000, # maket this number high (upper limit)
"n_samples": 10_000, # maket this number high (upper limit)
"strategies": [
{
"input": {
Expand Down
2 changes: 1 addition & 1 deletion docs/source/docker/examples/datasets_in_the_wild.rst
Expand Up @@ -111,7 +111,7 @@ select a diverse set of frames:
"remove_exact_duplicates": True
},
selection_config = {
"nSamples": 99,
"n_samples": 99,
"strategies": [
{
"input": {
Expand Down
10 changes: 5 additions & 5 deletions docs/source/docker/getting_started/first_steps.rst
Expand Up @@ -220,7 +220,7 @@ Now that everything is in place, let's configure and run a simple job.
"remove_exact_duplicates": True,
},
selection_config={
"nSamples": 50,
"n_samples": 50,
"strategies": [
{
"input": {
Expand Down Expand Up @@ -279,7 +279,7 @@ epochs on the input images before embedding the images and selecting from them.
"enable_training": True
},
selection_config={
"nSamples": 50,
"n_samples": 50,
"strategies": [
{
"input": {
Expand Down Expand Up @@ -316,7 +316,7 @@ you might want to change:
"enable_training": True,
},
selection_config={
"nSamples": 50,
"n_samples": 50,
"strategies": [
{
"input": {
Expand Down Expand Up @@ -400,7 +400,7 @@ a `shared directory` and then passing the checkpoint filename to the container.
"checkpoint": "lightly_epoch_X.ckpt"
},
selection_config={
"nSamples": 50,
"n_samples": 50,
"strategies": [
{
"input": {
Expand Down Expand Up @@ -476,7 +476,7 @@ The corresponding Python command to submit a job would then be as follows:
"remove_exact_duplicates": True
},
selection_config={
"nSamples": 50,
"n_samples": 50,
"strategies": [
{
"input": {
Expand Down
20 changes: 10 additions & 10 deletions docs/source/docker/getting_started/selection.rst
Expand Up @@ -55,7 +55,7 @@ The configuration of a selection needs to specify both the maximum number of sam
.. code-block:: python
{
"nSamples": 50,
"n_samples": 50,
"strategies": [
{
"input": {
Expand All @@ -69,7 +69,7 @@ The configuration of a selection needs to specify both the maximum number of sam
]
}
The variable :code:`nSamples` must be a positive integer specifying the absolute number of samples which should be selected.
The variable :code:`n_samples` must be a positive integer specifying the absolute number of samples which should be selected.

Each strategy is specified by a :code:`dictionary`, which is always made up of an :code:`input` and the actual :code:`strategy`.

Expand Down Expand Up @@ -243,7 +243,7 @@ There are several types of selection strategies, all trying to reach different o
embeddings in the output dataset. Since we normalize the input embeddings
to unit length, this value should be between 0 and 2.0.
This is often a convenient method when working with different data sources and trying to combine them in a balanced way.
If you want to use this stopping condition to stop the selection early, make sure that you allow selecting enough samples by setting :code:`nSamples` high enough.
If you want to use this stopping condition to stop the selection early, make sure that you allow selecting enough samples by setting :code:`n_samples` high enough.

.. note:: Higher minimum distance in the embedding space results in more
diverse images being selected. Furthermore, increasing the
Expand Down Expand Up @@ -317,7 +317,7 @@ Here are examples for the full configuration including the input for several obj
.. code-block:: python
{
"nSamples": 100, # set to the number of samples you want to select
"n_samples": 100, # set to the number of samples you want to select
"strategies": [
{
"input": {
Expand All @@ -338,7 +338,7 @@ Here are examples for the full configuration including the input for several obj
.. code-block:: python
{
"nSamples": 100, # set to the number of samples you want to select
"n_samples": 100, # set to the number of samples you want to select
"strategies": [
{
"input": {
Expand All @@ -362,7 +362,7 @@ Here are examples for the full configuration including the input for several obj
.. code-block:: python
{
"nSamples": 100, # set to the number of samples you want to select
"n_samples": 100, # set to the number of samples you want to select
"strategies": [
{
"input": {
Expand Down Expand Up @@ -393,7 +393,7 @@ Here are examples for the full configuration including the input for several obj
.. code-block:: python
{
"nSamples": 100, # set to the number of samples you want to select
"n_samples": 100, # set to the number of samples you want to select
"strategies": [
{
"input": {
Expand All @@ -416,7 +416,7 @@ Here are examples for the full configuration including the input for several obj
.. code-block:: python
{
"nSamples": 100, # set to the number of samples you want to select
"n_samples": 100, # set to the number of samples you want to select
"strategies": [
{
"input": {
Expand Down Expand Up @@ -451,7 +451,7 @@ Here are examples for the full configuration including the input for several obj
.. code-block:: python
{
"nSamples": 100, # set to the number of samples you want to select
"n_samples": 100, # set to the number of samples you want to select
"strategies": [
{
"input": {
Expand Down Expand Up @@ -493,7 +493,7 @@ The Lightly optimizer tries to fulfil all strategies as good as possible.
of 1000 images are selected, the output can only have a maximum of 1% ambulances. Thus a BALANCE target of having 20% ambulances cannot be fulfilled.

- **Too little samples to choose.**
If the selection algorithm can only choose a small number of samples, it may not be possible to fulfil the objectives. You can solve this by increasing :code:`nSamples`.
If the selection algorithm can only choose a small number of samples, it may not be possible to fulfil the objectives. You can solve this by increasing :code:`n_samples`.

Selection on object level
-------------------------
Expand Down
2 changes: 1 addition & 1 deletion docs/source/docker/integration/dagster_aws.rst
Expand Up @@ -335,7 +335,7 @@ Set the `YOUR_LIGHTLY_TOKEN`, `YOUR_DATASET_ID` accordingly.
"pretagging_debug": False,
},
selection_config={
"nSamples": 50,
"n_samples": 50,
"strategies": [
{
"input": {
Expand Down
2 changes: 1 addition & 1 deletion docs/source/docker/integration/examples/trigger_job.py
Expand Up @@ -13,7 +13,7 @@
'enable_training': False,
},
selection_config={
"nSamples": 50,
"n_samples": 50,
"strategies": [
{
"input": {
Expand Down

0 comments on commit 707eb17

Please sign in to comment.