Skip to content

Conversation

@mhasself
Copy link
Member

@mhasself mhasself commented Apr 2, 2025

Description

  • Sun avoidance, ignore_axes, named_positions, default_scan_params are all set up in the acu-configs file, now. Sun avoidance can still be globally disabled from cmdline. Ignore_axes can be overridden from command line. min/max el can still be overridden on command line.
  • Requires latest soaculib (but soaculib will remain backwards compatible with previous agent, for a bit).
  • Requires updates to agent instance args and active acu-configs.yaml.
  • Small fix to sun avoidance to cast out a numpy scalar.
  • Interface change; update_sun task "avoidance_radius" is now "exclusion_radius", to match all other usage. This arg wasn't exposed to ocs-web and likely has never been used by anyone.

This agent version will not work without the latest soaculib (simonsobs/soaculib#38); and upon deployment it will require changes to our running acu-configs.yaml / default.yaml (draft: https://github.com/simonsobs/ocs-deployment-configs/pull/417).

Motivation and Context

As features of ACU agent evolve, it is less practical to configure everything on the command line. In particular an upcoming feature of ACU Agent will be to allow/deny different motion types based on HWP state and current position. Such a table of information is not safely expressed as command-line args.

Other advanced features, such as Sun avoidance, also benefit from file rather than command line config.

This PR does not add the HWP stuff, but does change the config system for existing Agent features.

How Has This Been Tested?

I tested this on our ACU software simulator (which has led to significant upgrades in that simulator, along the way).

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

mhasself and others added 2 commits April 2, 2025 10:09
- Sun avoidance, ignore_axes, named_positions, default_scan_params are
  all set up in the acu-configs file, now.  Sun avoidance can still be
  globally disabled from cmdline.  Ignore_axes can be overridden from
  command line. min/max el can still be overridden on command line.
- Requires latest soaculib (but soaculib will remain backwards
  compatible with previous agent, for a bit).
- Requires updates to agent instance args and active
  acu-configs.yaml.
- Small fix to sun avoidance to cast out a numpy scalar.
- Interface change; update_sun task "avoidance_radius" is now
  "exclusion_radius", to match all other usage.  This arg wasn't
  exposed to ocs-web and likely has never been used by anyone.
@mhasself mhasself requested a review from BrianJKoopman April 2, 2025 16:07
Copy link
Member

@BrianJKoopman BrianJKoopman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I took a quick look and this looks sensible to me. One quick comment below.

As features of ACU agent evolve, it is less practical to configure everything on the command line.

This is probably a broader discussion to have, but I sort of feel this way about how agents are configured in general. As soon as any agent needs anything more complicated that is easily handled by argparse they have to start implementing their own configuration file format and loading. Maybe we should discuss a more general approach in ocs core.

@mhasself
Copy link
Member Author

mhasself commented Apr 3, 2025

As features of ACU agent evolve, it is less practical to configure everything on the command line.

This is probably a broader discussion to have, but I sort of feel this way about how agents are configured in general. As soon as any agent needs anything more complicated that is easily handled by argparse they have to start implementing their own configuration file format and loading. Maybe we should discuss a more general approach in ocs core.

Yes, agreed. The way agents are launched, it is now very artificial to pack so much into args, and then have them pass through the weird multi-level argparser. It would probably be better to just have a "config: " entry for each instance in the SCF, with everything you could ever want in there. I still launch agents with custom command line args these days, but mostly to override --site-host...

@mhasself mhasself requested a review from BrianJKoopman April 3, 2025 18:15
@BrianJKoopman BrianJKoopman merged commit d23277f into main Apr 3, 2025
7 checks passed
@BrianJKoopman BrianJKoopman deleted the mhasself/acu-new-config branch April 3, 2025 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants