Skip to content
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

Rename model stepping functions #42

Merged
merged 2 commits into from
Feb 9, 2025
Merged

Rename model stepping functions #42

merged 2 commits into from
Feb 9, 2025

Conversation

Tortar
Copy link
Collaborator

@Tortar Tortar commented Feb 8, 2025

This renames the functions for clarity:

  • run_one_epoch! -> step!
  • run_one_sim! -> run!
  • run_n_sims -> ensemblerun

@AldoGl
Copy link
Collaborator

AldoGl commented Feb 9, 2025

Thank you @Tortar, useful changes!

As far as I understand the changes you implemented are not only needed to improve clarity but also to make the APIs more coherent with Agents.jl, which itself adheres to the standard interface set in CommonSolve.jl.

Am I correct? It might be useful to elaborate a bit on these things here so that current and future users of BeforeIT.jl can understand the importance of this PR

@Tortar
Copy link
Collaborator Author

Tortar commented Feb 9, 2025

you are absolutely right! There could be even some more adherence to Agents.jl API by specializing the run! and ensemblerun functions there, but given the fact we don't currently use any tool present in Agents.jl at the moment, I don't think that it is sensible. To inherit from CommonSolve we risk less clashing though if we exported step! so I thought it was a good idea.

@Tortar
Copy link
Collaborator Author

Tortar commented Feb 9, 2025

Indeed another question is: do we want to export all these functions?

@AldoGl
Copy link
Collaborator

AldoGl commented Feb 9, 2025

Indeed another question is: do we want to export all these functions?

On that I have mixed feelings. While I understand that it is common to export such functions, I like the idea of calling "BeforeIT" functions using the Bit.function notation

@Tortar
Copy link
Collaborator Author

Tortar commented Feb 9, 2025

yeah right, we could use https://docs.julialang.org/en/v1/base/base/#public so that to define the interface without exporting, will do in a follow-up pr

@Tortar Tortar merged commit 0bdf7bd into main Feb 9, 2025
3 checks passed
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