forked from Emerge-Lab/PufferDrive
-
Notifications
You must be signed in to change notification settings - Fork 0
Sync with PufferDrive 2.0 #17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
charliemolony
wants to merge
81
commits into
main
Choose a base branch
from
sync-upstream
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Make sure we can overwrite goal_behavior from python side and other minor improvements. * Fix stop goal behavior bug. * Make goal radius configurable for WOSAC eval. * Reset to defaults + cleanup. * Minor * Minor * Incorprate feedback.
Accel is being cut in half for no reason
* Add control mode. * Fix error message.
Remove halved accel
* Fix incorrect obs dim in draw_agent_obs * Update drive.h --------- Co-authored-by: Daphne Cornelisse <cor.daphne@gmail.com>
…erge-Lab#104) * make joint action space, currently uses multidiscrete and should be replaced with discrete * Fix shape mismatch in logits. * Minor * Revert: Puffer doesn't like Discrete * Minor * Make action dim conditional on dynamics model. --------- Co-authored-by: Daphne Cornelisse <cor.daphne@gmail.com>
* Replace default learning rate and ent_coef. * Minor * Round.
* Quick integration of WOSAC eval during training, will clean up tomorrow. * Refactor eval code into separate util functions. * Refactor code to support more eval modes. * Add human replay evaluation mode. * Address comments. * Fix args and add to readme * Improve and simplify code. * Minor. * Reset to default ini settings.
* Add python test for ini file parsing - Check values from default.ini - Check values from drive.ini - Additional checks for comments capabilities * Add C test for ini file parsing - Add CMake project to configure, build and test - Test value parsing - Test comments format - Add comments for (un)expected results * FIX: Solve all memory errors in tests - Compile with asan * Remove unprinted messages * Add utest to the CI - Ini parsing tests - Update comments to clarify intent * Update tests/ini_parser/ini_tester.c - Change check conditions to if/else instead of ifs - Speed up parsing speed (exist as soon as match is found) Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update tests/ini_parser/ini_tester.c - Fix mismatch assignation Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * FIX: Move num_map to the high level of testing --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…-Lab#138) * Adding Interaction features Notes: - Need to add safeguards to load each map only once - Might be slow if we increase num_agents per scenario, next step will be torch. I added some tests to see the distance and ttc computations are correct, and metrics_sanity_check looks okay. I'll keep making some plots to validate it. * Added the additive smoothing logic for Bernoulli estimate. Ref in original code: message BernoulliEstimate { // Additive smoothing to apply to the underlying 2-bins histogram, to avoid // infinite values for empty bins. optional float additive_smoothing_pseudocount = 4 [default = 0.001]; } * Little cleanup of estimators.py * Towards map-based realism metrics: First step: extract the map from the vecenv * Second step: Map features (signed distance to road edges) A bunch of little tests in test_map_metric_features.py to ensure this do what it is supposed to do. python -m pufferlib.ocean.benchmark.test_map_metrics Next steps should be straightforward. Will need to check at some point if doing this on numpy isnt too slow * Map-based features. This works, and passes all the tests, I would still want to make additionnal checks with the renderer because we never know. With this, we have the whole set of WOSAC metrics (except for traffic lights), and we might also have the same issue as the original WOSAC code: it is slow. Next step would be to transition from numpy to torch. * Added a visual sanity check, plot random trajectories and indicate when WOSAC sees an offorad or a collision python pufferlib/ocean/benchmark/visual_sanity_check.py * Update WOSAC control mode and ids. * Eval mask for tracks_to_predict agents * Replacing numpy by torch for the computation of interaction and map metrics. It makes the computation way faster, and all the tests pass. I didn't switch kinematics to torch because it was already fast, but I might make the change for consistency. * Precommit * Resolve small comments. * More descriptive error message when going OOM. --------- Co-authored-by: WaelDLZ <wawa@CRE1-W60060.vnet.valeo.com> Co-authored-by: Waël Doulazmi <wawa@10-20-1-143.dynapool.wireless.nyu.edu> Co-authored-by: Waël Doulazmi <wawa@Waels-MacBook-Air.local> Co-authored-by: Daphne Cornelisse <cor.daphne@gmail.com>
Co-authored-by: Pragnay Mandavilli <pm3881@gr052.hpc.nyu.edu>
* Add option for targeted experiments. * Rename for clarity. * Minor * Remove tag * Add to help message and make deepcopy of args to prevent state pollution.
…merge-Lab#146) * Little optimizations to use less memory in interaction_features.py They mostly consist in using in-place operations and deleting unused variables. Code passes the tests. Next steps: - clean the .cpu().numpy() in ttc computation - memory optimization for the map_features as well * Add future todo. --------- Co-authored-by: Waël Doulazmi <waeldoulazmi@gmail.com>
…rent dataset (Emerge-Lab#151) * Support train/test split with datasets. * Switch defaults. * Minor. * Typo. * More robust way of parsing the path.
* Load the sprites inside eval-gif() * Color consistency. * pedestrians and cyclists 3d models * Minor. --------- Co-authored-by: Spencer Cheng <spenccheng@gmail.com>
* multiprocessing and progbar * cleanup
* Test * Edit. * Edit.
* Get rid of magic numbers in torch net. * Stop recording agent view once agent reaches first got goal. Respawning vids look confusing. * Add in missing models for headless rendering. * Fix bbox rotation bug in render function. * Remove magic numbers. Define constants once in drive.h and read from there.
Co-authored-by: Daphne Cornelisse <cor.daphne@gmail.com>
…merge-Lab#165) * Get rid of magic numbers in torch net. * Stop recording agent view once agent reaches first got goal. Respawning vids look confusing. * Add in missing models for headless rendering. * Fix bbox rotation bug in render function. * Remove magic numbers. Define constants once in drive.h and read from there. * Remove all magic numbers in drivenet.h * Clean up more magic numbers. * Minor * Minor.
* Added valid 2d carla towns, some code cleanup * Add carla 3D maps with objects
…pling in longer episodes (Emerge-Lab#186) * Make road lines and lanes visible in map. * Simplify goal resample algorithm: Pick best road lane point in road graph. * Delete redundant code. * Make the target distance to the new goal configurable. * Generalize metrics to work for longer episodes with resampling. Also delete a bunch of unused graph topology code. * Minor * Apply precommit. * Fix in visualizer. * fix metrics * WIP * Add goal behavior flag. * Add fallback for goal resampling and cleanup. * Make goal radius more visible. * Minor * Make grid appear in the background. * Minor. * Merge * Fix bug in logging num goals reached and sampled. * Add goal taret * Use classic dynamics model. * Fix descrepancies between demo() and eval_gif(). * Small bug fix. * Reward shaping * Termination mode must be 0 for Carla maps. * Add all args from ini to demo() env. * Clean up visualization code. * Clean up metrics and vis. * Fix metrics. * Add diversity to agent view. * Add better fallback. * Reserve red for cars that are in collision. * Keep track of current goals. * Carla testing simple/ * Use classic dynamics by default. * Fix small bug in goal logging (respawn). * Always draw agent obs when resampling goals. * Increase render videos timeout (carla maps take longer). * Minor vis changes. * Minor vis changes. * Rmv displacement error for now and add goal speed target. * Add optional goal speed. * Incorporate suggestions. * Revert settings. * Revert settings. * Revert settings. * Fixes * Add docs * Minor * Make grid appear in background. * Edits. * Typo. * Minor visual adaptations. --------- Co-authored-by: Daphne <daphn3cor@gmail.com> Co-authored-by: julianh65 <jhunt17159@gmail.com>
* Corrections of the resample code in drive.py: - the will_resample=1 followed by if will_resample looked weird to me (probably legacy code ?) - When we resample we should update the values of self.agent_offsets map dirs and num envs. The fact that we didn't update them isn't an issue because right now they are not accessed anywhere in the code, but then we should either remove these attributes of the Drive Class or either make ensure they contain the right values if someone wants to use them later. * Minor * Fix merge conflicts. --------- Co-authored-by: Daphne Cornelisse <cor.daphne@gmail.com>
…del (Emerge-Lab#206) * Fix human control with joint action space & classic model: Was still assuming multi-discrete. * Enable human control with jerks dynamics model. * Color actions yellow when controlling. * Slightly easier control problem? * Add tiny jerk penalty: Results in smooth behavior. * Pre-commit * Minor edits. * Revert ini changes. --------- Co-authored-by: Daphne <daphn3cor@gmail.com>
* Added WOSAC results on the 10k validation dataset * Code to evaluate SMART + associated doc * Edits. * Add link to docs. --------- Co-authored-by: Wael Boumediene Doulazmi <wbd2016@gl001.hpc.nyu.edu> Co-authored-by: Daphne Cornelisse <cor.daphne@gmail.com>
* Good behavior with trained policy - resampling. * Hardcode to 10 max agents for web version. * Browser demo v1. * More descriptive docs. * Release post edits. * Docs improvements. * Run precommit. * Better policy. * Revert .ini changes, except one. * Delete drive.dSYM/Contents/Info.plist * Delete pufferlib/resources/drive/puffer_drive_gljhhrl6.bin --------- Co-authored-by: Daphne <daphn3cor@gmail.com>
Co-authored-by: Daphne <daphn3cor@gmail.com>
Co-authored-by: Daphne <daphn3cor@gmail.com>
Move from mkdocs to mdbooks. Code heavily claude assisted.
Co-authored-by: Daphne <daphn3cor@gmail.com>
* fix minor errors * try to fix things for dark mode * Fixing dark/light mode error --------- Co-authored-by: Eugene Vinitsky <eugene@percepta.ai> Co-authored-by: Aditya Gupta <adigupta2602@gmail.com>
* Ensure the arrows are on the ground. * Date fix. * Update data docs with mixed dataset. * Increase map range. * Remove ini file for web demo. * WIP * Edit release post. * Minor docs fixes. * Writing changes. * Fix metrics. * Delete outdated readme files. * Minor. * Improve docs. * Fix institutions. * Update training info. * Reset configs to womd defaults. * Update score metrics. * Update docs * Update policy for demo. * Update demo files (new cpt) * Minor. * Add video. * Minor. * Keep defaults. --------- Co-authored-by: Daphne <daphn3cor@gmail.com>
|
Skipped: This PR changes more files than the configured file change limit: ( |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Self Play without conditioning
Self Play with conditioning
Population Play
Self Play & Adaptation
Population Play & Adaptation
Also fixed batch size >1 bug
Batch Size > 1