This repository has been archived by the owner on Oct 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
[LRP2] Hydra-ize local play and server deploys. #309
Merged
Merged
Conversation
This file contains 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
* fixed spacing issue from help message * fixed sizing issue on tutorial screen
* fixed spacing issue from help message * fixed sizing issue on tutorial screen * fixing borders and sizing issues * added styles for mobile landscape view * fixed fixed positioning in mobile view * cleared unused styles * fixed progress bar text * fixed text and nameplate styling and landing app tutorial page * added space at footer for landing app pages
* Merging _human and is_player * Removing old function * No longer true case about cap on characters
* fixed spacing issue from help message * fixed sizing issue on tutorial screen * fixing borders and sizing issues * added styles for mobile landscape view * fixed fixed positioning in mobile view * cleared unused styles * fixed progress bar text * fixed text and nameplate styling and landing app tutorial page * added space at footer for landing app pages * added views * updating structure * added example card component * added copy arrays, styling example cards, and building good example list * styled example list components * styling preview view * adjusted content and overflow to be right of it's label, fixed intro copy, fixed coloring in details section * fixed details interaction copy * fixed alignment of example card content * building button * fixed placement of definitions and added spacing * pre-merge * added error and success toats * added screenshot to tutorial, added toast to submit * duplicated previous task * formatting constraint events task * fixed conf * restructuring app * building multiple choice * added answer form * built reusable question components, added copy, building and styling forms * added fieldQuestion component * added fieldrow component * added attributesetter component * added constraints component and questions * styled question components, headers, and layout * added multiple select question component * built attribute setter, attribute row, and added dummy data * styled attribute setter * connected dummy Data, restyled events and constraint containers, colored object names * added copy updates from initial thoughts, added location description question * added taskdatacards and datacard component * styling cards and field row border * added formatquestion component * minor style fixes on field row, added formatquestion component to task card * added format question component to boolean question component * fixed formatquestion component * added drop down component and submit checklist components * fixed positioning and fixing numbering for questions * added delete functionality to attribute setter * added and styled submission component * Adding new example copy, passing name and descriptions (#245) * pre pull * pre pull * Fixing clobbered run_task.py (#246) * Adding new example copy, passing name and descriptions * Fixing run_task.py * Fixing script config * successfully updated run_task * added and styled description to object selector, form tips, and preview image * fixed payload update * updated example card component with primary and secondary desc and styled text * updated example card component with primary and secondary desc and styled text * Task2 submit (#248) * adding state for payload * added error state * centralizing copy * added isReversible, removeItems, isRemovingItems isCreatingEntity, createdEntity, isSecondaryHeld state * building updatedRemoveObjects * added create entity event to submission handler * added events and constraints handling and packaging for payload submission * wired constraint and event state to constraint and event components * connected new copy object to events * wiring task 2 * wiring event forms * fixed field row styles * added tooltip component, building preview and tutorial copy object * added task 2 tutorial copy, added and styled tutorial entry component, added and styled preview view * updated copy for preview and updated layout * added screenshots for Preview * finishing final submission and preview changes * fixed create entity connection to submission * connected constraints and fixed submission state * building error handling and checklist component logic * building error handling and checklist component logic * added error key to task copy file * added error toasts, error key, and completion checkboxes component * fixed checkbox, restyled headers, added plus icon to add attribute button * fixed error handling for broadcast messsage and item description changes * fixed attribute setter connection to submission payload * added documentation to components, removed console logs, fixed tooltip styling, and added mephisto handleSubmit to submit function * Fixed spacing, removed improperly placed checkboxes, updated copy, updated screenshots * merge * Finalizing Narrations pilot (#257) * Moving files * Importing new examine script * Updated review scripts * Final changes for pilot * dropped configs * style changes based on user feedback * Missing css class * Fixing run, fixing copy * Updating Attributes task final pilot * Is safe is light task (#256) * Troubleshooting image loading issue * added task4, added multiple choice, added run tas and yaml files, build task state * added task4, added multiple choice, added run tas and yaml files, build task state * added Sucess and Error Banners * added copy to task copy, restructuring QuestionBlock component * added format question, updated taskcopy, added header to QuestionBlock * added tooltip component * added checkbox component * restyled question block orietation, removed unused styles * added error handling and submissionhandler * properly styled error banner * fixed submission issues * added bootstrap styles, updated comments on Question Block and multiplechoice components, added more copy for preview * several minor styling fixes, checkbox positioning, alert color, etc * Task2 locationupdate (#254) * Troubleshooting image loading issue * added, connected, and styled onSelectQuestion component for handling location change event * added, connected, and styled onSelectQuestion component for handling location change event * added error handling for new location * removed console.logs from question on select and converted inline styles to classes * Updating folder location Co-authored-by: Jack Urbanek <[email protected]> * Merging task 3 into crowdsourcing ui (#260) * Troubleshooting image loading issue * initial setup complete * building Actor Block * adding actor block draw functionality * adding actor block draw functionality * added styles, building window size state * added getDimensions utility function, added dimension state to scale component, connectect state to konva stage * added scale range optionblock footer, styled scale question component and subcomponents, connected dummy data from app.js to task component * added color gradient for scale, fixing some border styling, and sizing issues * fixed styling and fixed drag boundaries * adding more informative variables and comments, fixed boundaries, tooling with flag sizing * added GetFlagDimensions util function, breaking down scale component into scalefield scalerange scale flag selection gallery components * fixed scaleRange component to map through array of ranges replacing previous hardcoded values * changed ScaleRange component name to ScaleFooter * change pixels to percentages in scalerange section width * added documentation to ScaleQuestion component * Fixed left boundary, broke flags and selection gallery into components * fixing flag placement * Added input header, added documentation, fixed leftSoftBoundary, fixed left flagpole shift, added rating value to selection state * building task copy and dummy data * added task copy * wiring task copy into question components * added tagrow and tagquestion * styled attributes tag question * added datatype switch for testing * added conditional rendering to number form in tag question * added state to tokenizer * added ref to tokenizer, added header to copy, added header prop to tag question * Task3 scale component (#249) * building Actor Block * adding actor block draw functionality * adding actor block draw functionality * added styles, building window size state * added getDimensions utility function, added dimension state to scale component, connectect state to konva stage * added scale range optionblock footer, styled scale question component and subcomponents, connected dummy data from app.js to task component * added color gradient for scale, fixing some border styling, and sizing issues * fixed styling and fixed drag boundaries * adding more informative variables and comments, fixed boundaries, tooling with flag sizing * added GetFlagDimensions util function, breaking down scale component into scalefield scalerange scale flag selection gallery components * fixed scaleRange component to map through array of ranges replacing previous hardcoded values * changed ScaleRange component name to ScaleFooter * change pixels to percentages in scalerange section width * added documentation to ScaleQuestion component * Fixed left boundary, broke flags and selection gallery into components * fixing flag placement * Added input header, added documentation, fixed leftSoftBoundary, fixed left flagpole shift, added rating value to selection state * pre payload branch * added scaled attribute basevalues * added updateHandler * fixed attributeupdatehandler * fixed boolean payload change handler * fixed custom scale rating and input * fixed numberic attribute handler * added numeric attributes array * added multiple select question and Usefulness scale * added default questions for each type to task copy * added attribute questions component and added more documentation to Task component * fixing tag question component added tooltip component * updated defaultAttribute questions styles and update functions * fixed multiple choice component * added selection consideration to multiplechoice component * added more informative error banner * tested submit successfully * fixed scale component header alignment * premerge changes, added to tutorial copy * pre merge * removed labels from custom attribute scale, added better variables describing fixed number values in scale field, fixed indentation in multiplechoice component, changed placeholder message in tagrow * Task3 preview (#253) * added attributeChecklist screenshots * added tutorial screenshots * added final screenshot for attributeRadio * added images to TaskCopy.js * added copy and screenshots for scales and type specific tutorials * populated preview with tutorial entry components using taskcopy * added new screenshots to attributeradio2, attributeradio3 assets, styled preview * added check for 4 custom boolean attributes * changed header text color to dark blue Co-authored-by: Justin Pinero <[email protected]> Co-authored-by: JustinPinero <[email protected]> * Moving task3 * Moving safe-light task Co-authored-by: Justin Pinero <[email protected]> Co-authored-by: JustinPinero <[email protected]>
… persona, location, reducers
…xperienceinfo component
…session spent gift exp slice
… local state in game page, sidebar, mobile header
mojtaba-komeili
approved these changes
Sep 1, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not fully understand how the password was checked. I see that it is using Tornado's 3rd party Authentication. But don't know much about that. But overall looks ok to me.
JackUrb
changed the base branch from
refactor-phase-2-full-deploy
to
new-data-model
December 9, 2022 20:30
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
CLA Signed
This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
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.
Overview
As LIGHT moves to having a single codebase that's supposed to deploy in many locations (devfairs, local development, production, etc), our previous method of passing
opt
s around everywhere, doing initializations inline, and rewriting configuration parsing in multiple places is no longer flying. This PR consolidates around Hydra, pushing our configuration intoStructuredConfig
s and thehydra_configs
directory.Illustration
One big upside of this change is that configuration can either be compositional or written out to a single file. It also supports different schemas for different setups, such that:
and
can both be used to configure the same
run_server.py
launch script, even though the/light/model_pool: baseline
default is set to load ParlAI models in-line, and/light/model_pool: remote
is set to connect to a series of remote addresses (based on the contents ofhydra_configs/light/model_pool/remote
). Similarly, the arguments forlocal
andaws-postgres
database schemas are entirely different, but we can pull values from each properly.Implementation
Big fixes
ModelPool
now implements aget_from_config_async
method, which initializes a completeModelPool
from theModelPoolConfig
class (which dynamically has a field for every standard key inModelTypeName
).GraphBuilder
s andModelLoader
classes now set aCONFIG_CLASS
which points to the correct structured config class that can be used to initialize them.hydra_registry.py
can then use these to initialize the configs as schemas as well as a baseline default. Introduces abase_model_loader
module to have better inheritance patterns.InteractionLogger
s are no longer registered on creation of anOOGraph
. These are instead created when theWorld
is assigned anOOGraph
, as the graph itself is just the representation of state, and theWorld
has higher level configuration about a running game. These thus instead initialize on aWorld
as well, and many callsites are changed to reflect this.Following changes
hydra_registry.py
set up, we now initialize it in the mainimport light
call such that all confs are available.OOGraph
s have been added to theWorldConfig
. Callsites are updated to include these where appropriate.ModelServer
cleanup - now that we use hydra args, we can directly pass these along to the hydra pool to do the entirety of initialization.OOGraph
no longer takes anopt
, instead gettingtitle
anddb_id
as optional fields. Many callsites updated.opt
deprecation:GameInstance
no longer takes inopt
, instead wanting aGraphBuilderConfig
to initialize the builder for it's games, and aWorldConfig
to feed that builder when initializing worlds.RegistryApplication
no longer takes inopt
or aLIGHTDatabase
, instead getting aWorldServerConfig
with everything it needs to initializeGameInstance
s.run_server.py
has been overhauled, now accepting hydra args and deferring model initialization to theModelPool
.js
config files.play_map.py
to be hydra-safetyping
additions to keep sanity through all thisDiscussions + Comments
hydra_registry.py
is required as a centralized place for all of actually registering configuration into the hydra system, the configs and subconfigs right now I've localized with what they configure (ie.MapJsonBuilderConfig
is in the same file asMapJsonBuilder
) for proximity/understanding. I've seen other structures of keeping these elsewhere to prevent dependency loops (configs and schemas in one place, implementations elsewhere), but I was wondering if that was really necessary here.TornadoPlayerProvider
,GameInstance
,RegistryApplication
architecture of the main game server is something of a sprawling mess. This is due for a refactor into theWorldServer
andLandingServer
setup noted in the internal design doc, so please forgive the somewhat messy architecture here.@hydra.main
as well as establishing the script configs feels a little boiler-plate-y but abstracting it into a@light_script(config=<>)
may be hiding too much of it into magic. Unsure where I land here.TODO
""
disable login via password entirely.Testing
play_map.py
,run_server.py
, andmodel_server.py
are working