All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
- Updates
grpcio
to work with python 3.10 on macOS.
- Ability to define metadata in the
Context
constructor, they will be passed to all grpc calls. - Support for SSL grpc endpoints without a private key.
context.get_controller([...])
,context.get_datastore([...])
,context.get_model_registry_v2([...])
can always be awaited.
- 'Status' RPC support for all services
- Missing directory service type in API
- Upgraded to support PyYaml up to 6.0.1 as v5 was broken by the release of cython 3.
- Return None when no data is availble in datastore content
- Use the most recent directory entry when there are duplicates
- Self IP address discovery functionality is now working on macOS
- Option to request full info (not just id and state) from 'watch_trials'
- Ability to use the SDK without spec (cog_settings)
- Automatic port selection for 'Context.serve_all_registered()'
- Ability to specify an explicit host to register a service to the directory
- Ability to specify trial properties for 'Datastore.all_trials()' and 'Datastore.get_trials()'
- Ability to specify trial ids for 'Datastore.all_trials()'
- Enable warning and error logging even if user did not define a logging handler
- Warn user when no logging handler is defined (i.e. proper logging is disabled)
- Better self IP address discovery functionality
- Deadlock in 'wait_for_newer' method of LatestModel
- Facility to track latest models automatically in the Model Registry
- 'properties' attribute to TrialParameters and TrialInfo
- Prometheus service is disabled by default
- Model Registry method
iteration_updates
to stream/push new model iterations - Parameter
wait_for_trials
(for Datastore methodall_trials
) to wait for new trials
- In Datastore reward could be returned as 'None' instead of 0.0
- Simplified interface for Model Registry (context.get_model_registry_v2)
- Support and dependency check for python 3.10
- 'COGMENT_LOG_LEVEL' environment variable
- Model Registry client
- Port parameter needs to be an int
- Context datastore request with default endpoint
- Reward tick ID was hard coded to -1
- Deprecation warning are only logged once
- 'Version' grpc method for pre-trial hooks
- Out-of-sync flag in datalog samples
- Parameter 'nb_buffered_ticks'
- Support for actor disconnection and response timeout parameters
- Global Directory integration
- Support for self registration to the Directory
- Use environment variable for Directory access details
- Generate to handle multiple imports properly
- Output deprecated warning for use of 'snapshot' in received observation
- Fix install of the package from a wheel
- Replace poetry centric build process with modern setuptools
- Introduce
cogment.generate.generate
, a function making the code generation previously available throughpython -m cogment.generate
accessible as a function.
- Integration tests are now able to install the Cogment CLI on their own.
- Integration tests no longer uses a Docker image.
- Fix integration test junit report output.
- Fixed a typo in the TrialParameter "environemnt_name" to "environment_name"
- Update of gRPC version to >=1.42 & <1.45
- Deprecate
cogment.LogParams
- Deprecate current way to use
PrehookSession
- Deprecate Session 'event_loop', renamed to 'all_events'
- Deprecate DatalogSession 'get_all_samples' renamed 'all_samples'
- Standardize string ouput of classes
cogment.TrialParameters
andcogment.ActorParameters
- Add ability to provide parameters on trial start call
- Datastore SDK
- Fix the failure of the cogment package caused by the partial removal of gRPC 1.45 from pypi
- cogment.generate now requires semantic arguments
- Cleanup user output
- Require grpc protocol url for endpoints
- Major internal changes to match API 2.0
- Minor use changes to match API 2.0 and improve usability
- Restrict the SDK to python >= 3.7 and <3.10 to maintain compatiblity with tensorflow ^2.7.0.
- Update the cogment api to v1.0.0 to v1.2.1
- Added expanation for strict 1.38 requirement on grpcio-tools.
- Enable pre-trial hooks to set a trial's environment's implementation in
prehook_session.environment_implementation
.
- Add
python -m cogment.generate
to compile the protobuf files and generatecog_settings.py
for a cogment project. This is designed as a replacement for thecogment generate
command for python cogment components.
- Update grpc version used to 1.38.1
- Better management of exception in user implementation coroutine
- The default Prometheus registry is now used by default, it was previously a custom built registry.
Furthermore, any prometheus registry can be passed to the constructor for
cogment.Context
. IfNone
is passed prometheus metrics are disabled entirely. - Passing
None
as theprometheus_port
in the constructor forcogment.Context
disables the launch of the Prometheus server.
- Update copyright notice to use the legal name of AI Redefined Inc.
- Exit datalog loop on receiving the trial
ended
state - Simulatenous trials with client actors
- Fix index in RecvAction to match the actor list
- Internal update to change
assert
into more useful statements - Internal update to add
__str__
to user accessible classes - Improve log output
- Improve/add error reporting
- Add function
get_remote_versions
to controller retrieving the remote versions including api and orchestrator versions.
- Initial public release.
- Using caret requirements for the dependencies of the library to avoid conflicts (cf. https://python-poetry.org/docs/dependency-specification/#caret-requirements)
- Environment can now receive messages
- Breaking Change Fix
Controller.get_actors()
, now properly retrieves the actor in a given trial, the function is nowasync
. - Fix unecessary exception thrown in
watch_trial
when async is cancelled
- Add
Controller.get_trial_info()
to retrieve the information of a given trial.
- Add a bit of code to make sure we are running in an asyncio task
EventType.FINAL
events do not contain data anymore- Fix when replies are
None
- Add
raw_trial_params
in the datalog session
- actor implementations metrics are now reported under
impl_name
- Initial beta release, no more breaking changes should be introduced.
- Rename ActorClass
id
toname
- Remove unused
feedback_space
parameters fromActorClass
.
- Technical release, updating dependencies to fixed versions.
- Log exporter is now available: trials param, observations, rewards, messages of every trials are sent to the log exporter service.
- The value returned from a
RecvReward.all_source
is now a classRecvRewardSource
instead of a tuple - Removed parameter
user_id
fromstart_trial
(it was not necessary)
- Breaking Introduce
Controller
, built for a given orchestrator endpoint it can be used to start and terminate trials. Previous ways of accessing the same such are discontinued. - Introduce the ability to listen for trial events (startup, ending, ...) using
Controller.watch_trials
.
- Session event loops now return classes
- Removal of "feedback" in rewards.
- Changes to allow for TLS communication.
- Manage errors and exceptions at end of trial
- Debug logging at critical points
- Add access to the complete actor configuration from prehook implementations
- Fix the instanciation of prehooks
- Fix the environment "Final" flag not being set in some cases
- Catching exceptions that normally occur at the end of trials
- Fix a crash occuring at the end of a trial in service actor implementations involving a
KeyError
. - tick_id was not being updated
- Create better errors around handling of implementation names
- Support messsages
- Avoid silent crashes by catching and logging exceptions thrown in async task and user code
- Cancel tasks properly when they raise exceptions
- Debug logging in strategic places
- Send actions list to environment (as documented)
- Store actor class name (string) for user facing session value and hide internal data
- Client servicer code
- Fix prometheus server
- Add missing cogment protobuf api files to the generated package.
- Initial alpha release, expect some breaking changes.