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

Feat/cli first version #27

Merged
merged 34 commits into from
Aug 16, 2024
Merged

Feat/cli first version #27

merged 34 commits into from
Aug 16, 2024

Conversation

jwric
Copy link
Contributor

@jwric jwric commented Jul 23, 2024

This adds a first version of the heat sdk CLI, easy to integrate into the user's project with a few macros. The CLI can currently:

  • Build a generated crate to call the collected training functions from the host crate
  • Run training commands with different backends and configs.

ThierryCantin-Demers and others added 29 commits June 27, 2024 18:29
Co-authored-by: Jonathan Richard <jwric@users.noreply.github.com>
… for now)

Co-authored-by: Jonathan Richard <jwric@users.noreply.github.com>
There are some problems with running with multiple config files with Heat for now.

Co-authored-by: Jonathan Richard <jwric@users.noreply.github.com>
Which allows for specifying json config files to run a experiment training with.

Co-authored-by: Thierry Cantin-Demers <ThierryCantin-Demers@users.noreply.github.com>
Co-authored-by: Jonathan Richard <jwric@users.noreply.github.com>
Co-authored-by: Jonathan Richard <jwric@users.noreply.github.com>
Co-authored-by: Jonathan Richard <jwrichard26@gmail.com>
Experiment can now be run from crate from CLI. General cleanup of macros. Only generate macros when necessary.

Co-authored-by: Jonathan Richard <jwric@users.noreply.github.com>
Co-authored-by: Jonathan Richard <jwric@users.noreply.github.com>
Seems to be a little untable when using multiple backends at the same time.

Co-authored-by: Jonathan Richard <jwric@users.noreply.github.com>
Moved codegen to crate gen (mostly).

Co-authored-by: Jonathan Richard <jwric@users.noreply.github.com>
to prevent building heat-sdk-cli when building second cli
Organized crate generation in structs

Co-authored-by: Jonathan Richard <jwric@users.noreply.github.com>
…code.

Co-authored-by: Jonathan Richard <jwric@users.noreply.github.com>
better encapsulation for cli context, removed most getters and setters
setup-toolchain.sh Outdated Show resolved Hide resolved
@ThierryCantin-Demers ThierryCantin-Demers changed the title [Draft] Feat/cli first version Feat/cli first version Jul 31, 2024
Copy link
Member

@syl20bnr syl20bnr left a comment

Choose a reason for hiding this comment

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

Very very nice ! Learnt a lot of new stuff with this PR !
I have some very light optional suggestions.

args: LocalTrainingRunArgs,
mut context: HeatCliContext,
) -> anyhow::Result<()> {
// print all functions that are registered as training functions
Copy link
Member

Choose a reason for hiding this comment

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

Maybe create functions for the display of registered flags, the check of functions, the run loop etc...

function: String,
config_path: String,
project: String,
key: String,
Copy link
Member

Choose a reason for hiding this comment

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

Maybe declare a struct for this since there is already 4 fields ?

}

/// Returns the backend type names for the given procedure type.
/// Ex: For ProcedureType::Training, the backend type name will be MyTrainingBackend and autodiff backend type name will be MyTrainingAutodiffBackend.
Copy link
Member

Choose a reason for hiding this comment

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

Not sure that the comment is up to date

@syl20bnr
Copy link
Member

Let's merge this for now.

@syl20bnr syl20bnr merged commit ead3d6e into main Aug 16, 2024
2 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.

4 participants