How to disable warning message: "WARNING Source type is set to 'repo' ...."

Hi,

When running experiments, the following warning is logged but I cannot find any information on it online or how to disable it.
I am initializing and running the experiments with wandb through a jupyter notebook, nothing with jobs. I also do not want a job to be created, no idea where it comes from.

After the experiment is done running it warns me with the following:

wandb: WARNING Source type is set to 'repo' but some required information is missing from the environment. A job will not be created from this run. See https://docs.wandb.ai/guides/launch/create-job

What does this mean and how do I disable it?

Hi @capsar-meijer, could you describe how you are executing your runs? The error indicates you are attempting to create a launch job through a github repo, Create a launch job | Weights & Biases Documentation.

Goodmorning @mohammadbakir,

Thank you for taking the time to help figure out where the warning is coming from.

The executions are run as:

def train_model(model, tr_dataloader, config, val_dataset=None, test_dataset=None):
    wandb.init(project="project123", entity=os.getenv("WANDB_ENTITY"), tags=[config['experiment_name']],
                name=f"{model.name}_{datetime.datetime.now().strftime('%m-%d_%H%M%S')}",
                config=config)

    for epoch in range(1, num_epochs + 1):
        epoch_metrics = {'epoch': epoch}
        .....
        # Here the training is performed & metrics, figures and dataframes are added to the epoch_metrics.
        .....
        wandb.log(epoch_metrics)
    wandb.finish()

It is run inside a Gitlab repository and I have a .env file that contains:

WANDB_ENTITY=
WANDB_API_KEY=
WANDB_SILENT=true

Best,
Caspar

Hi @capsar-meijer, thank you for sending over that example. The reason you are seeing this is due to our logic for wandb launch job creation. Currently, if you’re working inside a Git repository on your local machine, we attempt to create a wandb launch job for the run and if we can’t gather the required Git information (like the remote URL and commit hash), the logic will proceed to throw the warning you are seeing. I will have to flag this with the launch team for review as you aren’t explicitly trying to create a launch job.

In the meantime, add the following to your wandb.init call settings=wandb.Settings(disable_job_creation=True). This should disable the job creation logic and prevent those warnings.

Hi @mohammadbakir, thank you, your solution disabled the warning.

Hi @capsar-meijer you’re welcome. I received confirmation from our launch team as to why the automatic job creation.

The main reason is to make sure the run they’re making is reproducible. With a job, we can store the entrypoint/args/commit so the user can run it again if needed. If they don’t want to create a job, they can opt out by setting "disable_job_creation": True in their wandb init settings

Will mark this solved but please do reach out again anytime we could be of help.