Add your description here
Project description
Installation
Follow this guide to install UV.
Running it
To run the entrypoint, run the following command.
uv run -m semistaticsim.groundtruth.main
You can set the target amount of simulation time to collect as well as the scan size. The bigger the scan size, the higher the RAM usage and jitting time, but it has the potential to go faster if you want to collect a lot of simulation time.
After collecting the data, plot the groundtruth of the first pickupable across all its valid receptacles:
uv run -m semistaticsim.groundtruth.viz
To run the ai2thor simulation, you can use
uv run -m semistaticsim.keyboardcontrol.main_skillsim
On the cluster
Migue's installaton:
I had issues installing the environment using Conda in the cluster. So I followed slightly different steps:
First I installed libmamba following the instructions listed here. After that I created these aliases so conda is not running by default in my session
# In .bashrc
# Hook to activate conda base
alias conda-hook='eval "$($HOME/miniconda3/bin/conda shell.$(basename $SHELL) hook)"'
# Hook to activate envirnment when running interactive
alias semistatic-inter="cd ~; cd $HOME/projects/SemiStaticSim; conda-hook; conda activate sss; export LD_LIBRARY_PATH=$CONDA_PREFIX/lib:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CONDA_PREFIX/lib"
# Hook to activate envirnment when running in multirun
alias semistatic-cluster="cd ~; cd $HOME/projects/SemiStaticSim; module load python/3.10"
After installing libmamba, I installed the environment as follows:
conda-hook
conda create -n sss -c conda-forge python=3.12 libvulkan-loader conda-forge::uv --solver=libmamba
rm -rf ./generated_data && mkdir -p $SCRATCH/perpetua_data/sss/generated_data && ln -s $SCRATCH/perpetua_data/sss/generated_data ./generated_data
Charlie's installaton:
module load anaconda/3
conda create -n sss -c conda-forge python=3.12 libvulkan1 uv
rm -rf ./generated_data && mkdir -p $SCRATCH/perpetua_data/sss/generated_data && ln -s $SCRATCH/perpetua_data/sss/generated_data ./generated_data
Single job on an interactive compute node:
Migue's running scheme:
semistatic-inter
# uv run -m semistaticsim.[groundtruth.main | keyboardcontro.main_skillsim] [hydra overrides]
Charlie's running scheme:
module load anaconda/3 && conda activate sss
export LD_LIBRARY_PATH=$CONDA_PREFIX/lib:$LD_LIBRARY_PATH
# uv run -m semistaticsim.[groundtruth.main | keyboardcontro.main_skillsim] [hydra overrides]
Multirun:
For both GT and Rendering, there's a lot of SLURM setup at first, and then the last few args will be actual hydra overrides.
Note: if you have loaded anaconda/3, you WILL break the multirun. You need to unload all modules, and only load python/3.10 and launch using uv. The anaconda/3 module will be automatically loaded by the scripts themselves, inside semistaticsim/spoof_hydra.py.
NOTE: This is set to launch on partition main. On the Mila cluster, this means that only 1 batch of 4 tasks will run at once.
Swap to partition long if you wish for massive parallelism (but less priority).
Miguel's running scheme: Same but do: git checkout miguel/cluster
Groundtruth:
module load python/3.10
uv run -m semistaticsim.groundtruth.main --multirun hydra/launcher=sbatch +hydra/sweep=sbatch hydra.launcher._target_=hydra_plugins.packed_launcher.packedlauncher.SlurmLauncher hydra.launcher.tasks_per_node=4 +hydra.launcher.timeout_min=59 hydra.launcher.gres=gpu:1 +hydra.launcher.constraint='40gb|48gb' hydra.launcher.cpus_per_task=2 hydra.launcher.mem_gb=40 hydra.launcher.array_parallelism=300 hydra.launcher.partition=main hydra.launcher.name=SSS_GT procthor_index=range\(0,8\)
Rendering:
module load python/3.10
uv run -m semistaticsim.keyboardcontrol.main_skillsim --multirun hydra/launcher=sbatch +hydra/sweep=sbatch hydra.launcher._target_=hydra_plugins.packed_launcher.packedlauncher.SlurmLauncher hydra.launcher.tasks_per_node=4 +hydra.launcher.timeout_min=59 hydra.launcher.gres=gpu:1 +hydra.launcher.constraint='40gb|48gb' hydra.launcher.cpus_per_task=2 hydra.launcher.mem_gb=40 hydra.launcher.array_parallelism=300 hydra.launcher.partition=main hydra.launcher.name=SSS_PRIV mode=auto index=range\(0,4\)
How-to
Features are based around varying the level of scene-to-scene semantic transfer. Every simulator step, some dt time elapses. When the duration_left reaches 0, the transition model selects the next receptacle that the object will transition to. Then, the duration model sampels the amount of tiem that the objet will spend in that new receptacle.
Duration model:
- even is "evenly spread duration of all steps"
- instant is "spend NO time at this place, immediately transition at the next step" (this is what flowmaps currently has in your 2D simulator)
- deterministic is "randomly split the day among all steps"
- gaussian is the same as deterministic with some gaussian noise
Transition model:
- "fixed_canonical": object cycles down a list of fixed receptacles
- "fixed_0.1_0.9": object has 10% chance of staying put, 90% chance of going to the next receptacle in cycle (this is what the 2D flowmaps simulator has)
- "uniform_no_diag": fully uniform transition matrix
- "uniform_full": fully uniform transition matrix
- "location_weighted_uniform_no_diag": uniform transition matrix weighted by the ProcThor receptacle prior
- "location_weighted_uniform_full": uniform transition matrix weighted by the ProcThor receptacle prior
Preliminary scan experiments
- SCANSIZE 10: ~33.5 it/s : 335 steps/s
- 100 : 33 : 3300
1000 : eta 50min
1000 : cpu: 3s/it; cuda is same!
To build a package for PyPi
# bump the version in the .toml
uv build
# delete the old build in ./dist
uv publish
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file semistaticsim-0.5.13.tar.gz.
File metadata
- Download URL: semistaticsim-0.5.13.tar.gz
- Upload date:
- Size: 90.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cea53d0061ca849048ad3fe547f5522d6bd6707fc4061e0409e7215c5c4b56d3
|
|
| MD5 |
e54953ba4c24dc601d208318c948a6a0
|
|
| BLAKE2b-256 |
7f0efd0d7cecf346d932108927b9e1e6b6df42a08fa329f82ccf81def71d7de4
|
File details
Details for the file semistaticsim-0.5.13-py3-none-any.whl.
File metadata
- Download URL: semistaticsim-0.5.13-py3-none-any.whl
- Upload date:
- Size: 103.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0618ca264121b1d5fe0684eee06df1dddc1f972d913c6fb5b1d40b99fc609d4f
|
|
| MD5 |
3fba4aa2d61e436d5bf19b0474474222
|
|
| BLAKE2b-256 |
ec4c18dc6a50a0a09bab786a697f2eaa68f9d354ed66e990e657bd057aa9fd4e
|