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

CI. Dummy runtime. Dummy offer. Miners removed. #12

Merged
merged 16 commits into from
Oct 30, 2023
Merged

Conversation

pwalski
Copy link
Contributor

@pwalski pwalski commented Oct 23, 2023

Resolves: #8

@pwalski pwalski changed the title No miners, dummy runtime. Dummy runtime. Miners removed. Oct 23, 2023
@pwalski pwalski changed the title Dummy runtime. Miners removed. CI. Dummy runtime. Dummy offer. Miners removed. Oct 24, 2023
@pwalski pwalski marked this pull request as ready for review October 24, 2023 09:04
@pwalski
Copy link
Contributor Author

pwalski commented Oct 24, 2023

When tagged CI produces release with exe files https://github.com/golemfactory/ya-runtime-ai/releases/tag/pre-rel-v0.1.0-rc3
README.md describes how to set up ya-provider.

@pwalski
Copy link
Contributor Author

pwalski commented Oct 25, 2023

I need to add capabilities property with runtime package name.

@pwalski pwalski marked this pull request as draft October 25, 2023 08:49
@pwalski pwalski marked this pull request as ready for review October 27, 2023 15:13
src/cli.rs Outdated Show resolved Hide resolved
Comment on lines +118 to +132
let cli = match Cli::try_parse() {
Ok(cli) => cli,
Err(err) => {
log::error!("Failed to parse CLI: {}", err);
err.exit();
}
};

match cli.runtime.to_lowercase().as_str() {
"dummy" => run::<process::dummy::Dummy>(cli).await,
_ => {
let err = anyhow::format_err!("Unsupported framework {}", cli.runtime);
log::error!("{}", err);
anyhow::bail!(err)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of logging error and returning it, you could create 2-levels main function: external will print error message and internal will just use ? operator.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This bail is really pointless because ya-provider does not save supervisor/exe-unit process output. I added logs only because I could not determine why process is failing (and I could not start it outside of ya-provider context because it requires gsb endpoint to start). This block of code will need to be rewritten the moment we will add new runtime/ai_framework/package.

Comment on lines +64 to +68
let capabilities = vec![serde_json::Value::String(runtime_name)];
template.properties.insert(
"golem.runtime.capabilities".to_string(),
serde_json::Value::Array(capabilities),
);
Copy link
Contributor

Choose a reason for hiding this comment

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

Runtime name is added as only capability, but we should list all possible runtimes here. And probably we will need more descriptive structure than just list.

But this isn't important now. Let's leave it as is.

src/process.rs Outdated Show resolved Hide resolved
src/process.rs Outdated Show resolved Hide resolved
@pwalski pwalski merged commit 5cd5543 into main Oct 30, 2023
1 check passed
@pwalski pwalski deleted the windows_build branch October 30, 2023 18:59
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.

ExeUnit
2 participants