jupyterLab Wandb does not initiate - jupyter-lab

I try to use WanDB but when i use wandb.init() there is nothing.!
I am waiting a lot of time.
However, there is nothing in window.
This is working well in Kernel.
please.. help me guys

I work at Weights & Biases. If you're in a notebook the quickest thing you can do to get going with wandb is simply:
wandb.init(project=MY_PROJECT, entity=MY_ENTITY)
No !wandb login, wandb.login() or %%wandb needed. If you're not already logged in then wandb.init will ask you for you API key.
(curious where you found %%wandb by the way?)

Related

Discord.js client doesn't work and doesn't give any errors

So my discord bot that I host on repl.it for free (so that might be the problem) works fine most of the time but sometimes, it will just randomly stop working. Even when I restart it, the client.on("ready") function won't trigger and nothing works. This problem just fixes it self after some time but it is really anoying and it keeps happening. It has nothing to do with my code as it works and there is nothing chance based in my code that may break it, and even then it would trow an error, this just doesn't work and doesn't give any errors. If you would like to take a look at my code it is on repl.it here. Thanks in advance!
Replit is a free hosting platform but if I remember well, if no one get into the page for a certain time, the program will stop. It is probably that that stops your bot.
(sorry if you don't understand well my English)
heyy, you can fork your repl, if you're token is in the process.env you must add it, else if your token is in a config.json file, it's ok, just fork it and it's done

PyDTMC output graph overlaps on code in a notebook

I just installed PyDTMC and use it in a Jupyter notebook.
Following the examples on this page https://pypi.org/project/PyDTMC/ leads to a surprising result: plot_graph() overlaps on code above.
How could I fix that?
(m.plot_graph(mc, dpi=200) shows the full graph, but I don't like this workaround)
Note: jupyter-notebook 6.3.0, Python 3.8.5, PyDTMC 4.9.0 (on Archlinux)
The problem was mentioned here https://github.com/TommasoBelluzzo/PyDTMC/issues/6 with a fixing suggestion. Fix applied in this fork https://github.com/yagu0/PyDTMC.
It's still unclear why the figure size needs to be augmented (setting a higher dpi also works, but doesn't look like a clean solution). So I let this post open, in case of someone could explain :-)

Does the sagemaker official tutorial generate an AttributeError, and how to solve it?

I'm following the AWS Sagemaker tutorial, but I think there's an error in the step 4a. Particularly, at line 3 I'm instructed to type:
s3_input_train = sagemaker.s3_input(s3_data='s3://{}/{}/train'.format(bucket_name, prefix), content_type='csv')
and I get the error
----> 3 s3_input_train = sagemaker.s3_input(s3_data='s3://{}/{}/train'.format(bucket_name, prefix), content_type='csv')
AttributeError: module 'sagemaker' has no attribute 's3_input'
Indeed, using dir shows that sagemaker has no attribute called s3_input. How can fix this so that I can keep advancing in the tutorial? I tried using session.inputs, but this redirects me to a page saying that session is deprecated and suggesting that I use sagemaker.inputs.TrainingInput instead of sagemaker.s3_inputs. Is this a good way of going forward?
Thanks everyone for the help and patience!
Using sagemaker.inputs.TrainingInput instead of sagemaker.s3_inputs worked to get that code cell functioning. It is an appropriate solution, though there may be another approach.
Step 4.b also had code which needed updating
sess = sagemaker.Session()
xgb = sagemaker.estimator.Estimator(containers[my_region],role, train_instance_count=1, train_instance_type='ml.m4.xlarge',output_path='s3://{}/{}/output'.format(bucket_name, prefix),sagemaker_session=sess)
xgb.set_hyperparameters(max_depth=5,eta=0.2,gamma=4,min_child_weight=6,subsample=0.8,silent=0,objective='binary:logistic',num_round=100)
uses parameters train_instance_count and train_instance_type which have been changed in a later version (https://sagemaker.readthedocs.io/en/stable/v2.html#parameter-and-class-name-changes).
Making these changes resolved the errors for the tutorial using conda_python3 kernel.

Weights&Biases Sweep - Why might runs be overwriting each other?

I am new to ML and W&B, and I am trying to use W&B to do a hyperparameter sweep. I created a few sweeps and when I run them I get a bunch of new runs in my project (as I would expect):
Image: New runs being created
However, all of the new runs say "no metrics logged yet" (Image) and are instead all of their metrics are going into one run (the one with the green dot in the photo above). This makes it not useable, of course, since all the metrics and images and graph data for many different runs are all being crammed into one run.
Is there anyone that has some experience in W&B? I feel like this is an issue that should be relatively straightforward to solve - like something in the W&B config that I need to change.
Any help would be appreciated. I didn't give too many details because I am hoping this is relatively straightforward, but if there are any specific questions I'd be happy to provide more info. The basics:
Using Google Colab for training
Project is a PyTorch-YOLOv3 object detection model that is based on this: https://github.com/ultralytics/yolov3
Thanks! 😊
Update: I think I figured it out.
I was using the train.py code from the repository I linked in the question, and part of that code specifies the id of the run (used for resuming).
I removed the part where it specifies the ID, and it is now working :)
Old code:
wandb_run = wandb.init(config=opt, resume="allow",
project='YOLOv3' if opt.project == 'runs/train' else Path(opt.project).stem,
name=save_dir.stem,
id=ckpt.get('wandb_id') if 'ckpt' in locals() else None)
New code:
wandb_run = wandb.init(config=opt, resume="allow",
project='YOLOv3' if opt.project == 'runs/train' else Path(opt.project).stem,
name=save_dir.stem)

How do I simulate keyboard events in Chromedriver/Selenium for Node.js?

I'm trying to automate uploading an image file to a server to which I don't have a better form of access (FTP, etc.). I'm using Node.js with Selenium and Chromedriver, and everything is going well until I need to simulate special keys. I've researched a bit, and have found nothing so far. Mac specific answers are ok for this.
I tried this from another answer somewhere, but it's not working for me:
driver.findElement(webdriver.By.name(uploadName))
.click()
.sendKeys(Keys.COMMAND + Keys.SHIFT + 'g')
.sendKeys(imgPath)
.sendKeys(Keys.RETURN);
It fails out because Keys is undefined, but I haven't run across any other ways to get at the commands.
After further research, it seems that this is the wrong way to do this. Selenium and Chromedriver don't really support OS level interaction, but there is an easier way.
driver.findElement(webdriver.By.name(uploadName)).sendKeys(imgPath);
This will target uploadName and then give it the file path passed into sendKeys. This bypasses the messy OS file dialogs.

Resources