# Macro interpolation and MLJ.jl

**URL:** <https://discourse.julialang.org/t/macro-interpolation-and-mlj-jl/45273>\
**Category:** New to Julia\
**Created:** [August 20, 2020, 4:32pm UTC](https://discourse.julialang.org/t/macro-interpolation-and-mlj-jl/45273 "2020-08-20T16:32:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sdwfrost](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sdwfrost/32/2831_2.png) [@sdwfrost](https://discourse.julialang.org/u/sdwfrost)\
**Post date:** [August 20, 2020, 4:32pm UTC](https://discourse.julialang.org/t/macro-interpolation-and-mlj-jl/45273/1 "2020-08-20T16:32:10Z")

</div>

I’m trying to use the @load macro from MLJ.jl, which looks like this:

```julia
classifier = @load AdaBoostClassifier

```

I want to loop through multiple arguments, so I’d like to do something like

```julia
cname = "AdaBoostClassifier"
classifier = @load $cname

```

but as this is a macro, the string isn’t interpolated into the macro. Past posts talk about putting string interpolation into macro definitions, but I just want to use an already-provided macro.

---

<div class="post-metadata">

**Author:** ![tlienart](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tlienart/32/7640_2.png) [@tlienart](https://discourse.julialang.org/u/tlienart)\
**Post date:** [August 20, 2020, 5:14pm UTC](https://discourse.julialang.org/t/macro-interpolation-and-mlj-jl/45273/2 "2020-08-20T17:14:26Z")

</div>

I’d say the easiest route is to use `load` (i.e. `MLJ.load(cname)`) see also `?MLJ.load`
