How to cancel a running job from the UI? - azure-machine-learning-service

Am I missing something but how can I cancel a run in my workspace from https://ms.portal.azure.com/ ? The cancel button is always greyed out.
I know I can use use the sdk to cancel a run using:
run = [ r for r in Experiment(ws, 'myExp').get_runs() if r.id == '899b8314-26b6-458f-9f5c-539ffbf01b91'].pop()
run.cancel()
But it would be more convenient to be able to do it from the UI

What kind of run is this? Canceling is not currently enabled for pipeline runs in the UI, but is supported for other run types.

Also, faster way to get run by id is
run = Run(ws.experiments["myExp"], "899b8314-26b6-458f-9f5c-539ffbf01b91")

Related

How to update gitlab runner on docker via a sh script

I am fairly new to linux and dockers. I am trying to create an automation to update a Docker Gitlab runner when it is not in use. (i.e no of containers = 2)
My approach : Pseudo Code. My idea is to call the function to update the runner and if condition is not satified keep calling the function until the gitlab runner is updated.
func_update ()
{
if ( containers=2)
Update the runner
update_flag = True
}
update_flag = False
while (flag = False)
do
func_update()
sleep 2mins
done
Please advice me if I doing it in the right way, if not please let me know a better way to tackle this.

How do I skip the execution of the plugin code?

MODX Revolution 2.7.3-pl.
there is a plugin that responds to these events:
1.case 'msOnCreateOrder'
2.case 'OnUserSave'
what needs to be written in the plugin code so that the system ignores the plugin code and just continues its work?
the way is this: the client collects the basket, clicks "Order", the system goes to the plugin, the plugin crashes, the system does not continue to work, nothing happens to the client on the page.
i can't just turn off the plugin.
thanks :)
right after
case 'msOnCreateOrder:'
and
case 'OnUserSave':
(or even at the very beginning) add
return true;
thus, the plugin will return a successful result without ever having worked.

Is there a way to perform certain action by only first user at the end of test?

I have just started using locust with one custom client. At the end of the test (on_stop) I am fetching some results from APM and logging them.
Issue : when I use below command, all 1000 users are fetching those details and logging the data from APM. But I want only the 1st user to do this job and let other users to ignore this call.
$ locust -f --headless -u 1000 -r 100 --run-time 1h30m
Please let me know if someone has done something similar earlier. Thanks in advance.
I think what you probably want is test_stop EventHook. It runs once when the test is stopped. If you run in distributed mode, it runs once only on the master.
https://docs.locust.io/en/stable/api.html#locust.event.Events.test_stop
My understanding is that you are not running in distributed mode and you are using User class' on_stop method. I would try handling it with some global variable, it is quick and might need some work, like this:
apm_logging_user_assigned = False
class MyUser(User):
test stuff here ...
def on_start(self):
if apm_logging_user_assigned is False:
self.apm_log = True
apm_logging_user_assigned = True
super().on_start()
def on_stop(self):
if self.apm_log:
do your apm stuff here...
super().on_stop()

Linux Command Output to Chef Attribute

The issue is I need to assign the value of Linux command to CHef Attribute.But unable to do it.
Im using the below code and not finding the result. Kindly Help what im
missing
ruby_block "something" do
block do
Chef::Resource::RubyBlock.send(:include, Chef::Mixin::ShellOut)
node.default['foo'] = shell_out("echo Hello world").stdout
end
action :create
end
log "demo" do
message lazy { node['foo'] }
end
Below is the Run logs:
Starting Chef Client, version 13.9.1
resolving cookbooks for run list: ["sample_repo"]
Synchronizing Cookbooks:
- sample_repo (0.1.4)
Installing Cookbook Gems:
Compiling Cookbooks...
Converging 2 resources
Recipe: sample_repo::default
* ruby_block[something] action create
- execute the ruby block something
* log[demo] action write
Running handlers:
Running handlers complete
Chef Client finished, 2/2 resources updated in 02 seconds
Thanks in advance
Your code is fine, the log message is not showing because the default level on the log resource is :info and by default chef-client doesn't show info-level log messages when run interactively. That said, this kind of code where you store stuff in node attributes is very brittle and probably shouldn't be used unless specifically needed. Better is to do this:
message lazy { shell_out("echo Hello world").stdout }
Also you don't need any funky mutating include stuff like you there AFAIK, the shell_out helpers are available in most contexts by default. Also you should usually use shell_out!() rather than shell_out(), the ! version automatically raises an exception if the command fails. Unless you specifically want to allow a failed command, use the ! version.

webdriver-sync running asynchronously?

I'm trying to create selenium tests that run each step synchronously, without using .then(), or async/await. The reason for this is that I want to create a set of functions that allow pretty much anyone on our test team, almost regardless of tech skills to write easy to read automated tests. It looks to me like webdriver-sync should give me exactly what I want. However, the following dummy code is producing problems:
var wd = require('webdriver-sync');
var By = wd.By;
var Chromedriver = wd.Chromedriver;
var driver = new Chromedriver;
driver.get('https://my.test.url');
var myButton = driver.findElement(By.cssSelector('[id*=CLICK_ME]'));
myButton.click();
It tries to run - browser is launched, and page starts to load... but the steps are not executed synchronously - it goes on and tries to find and click "myButton" before the page has finished loading, throwing a "no such element" error... which to me kinda defeats the point of webdriver-sync?! Can someone tell me where I am going wrong?
FWIW, I have webdriver-sync 1.0.0, node v7.10.0, java 1.8.0_74, all running on CentOS 7.
Thanks in advance!
You need to put double-quotes around "CLICK_ME" as it's a string value.
Generally, though, it's a good idea to Wait for specific elements because dynamic pages are often "ready" before all their elements have been created.

Resources